Re: lock_kernel() usage and sync_*() functions

2001-03-22 Thread Alexander Viro
On Thu, 22 Mar 2001, Ingo Oeser wrote: > Could we remove the "magic" sync_flag from the exported interface? Sure. But I seriously suspect that sync_dev() is wrong in 100% of cases. So "flag" is eventually going to become "do we want to sync it or not?" thing. However, I don't want to deal with

Re: lock_kernel() usage and sync_*() functions

2001-03-22 Thread Ingo Oeser
On Thu, Mar 22, 2001 at 12:18:27AM -0500, Alexander Viro wrote: > > I started with adding > void invalidate_dev(kdev_t dev, int sync_flag) > { > struct super_block *sb = get_super(dev); > if (sync_flag == 1) > sync_dev(dev); > else if (sync_flag == 2

Re: lock_kernel() usage and sync_*() functions

2001-03-21 Thread Alexander Viro
On 21 Mar 2001, Linus Torvalds wrote: > In article <[EMAIL PROTECTED]>, > Nigel Gamble <[EMAIL PROTECTED]> wrote: > > > >Why is the kernel lock held around sync_supers() and sync_inodes() in > >sync_old_buffers() and fsync_dev(), but not in sync_dev()? Is it just > >to serialize calls to thes

Re: lock_kernel() usage and sync_*() functions

2001-03-21 Thread Linus Torvalds
In article <[EMAIL PROTECTED]>, Nigel Gamble <[EMAIL PROTECTED]> wrote: > >Why is the kernel lock held around sync_supers() and sync_inodes() in >sync_old_buffers() and fsync_dev(), but not in sync_dev()? Is it just >to serialize calls to these functions, or is there some other reason? A lot of

lock_kernel() usage and sync_*() functions

2001-03-21 Thread Nigel Gamble
Why is the kernel lock held around sync_supers() and sync_inodes() in sync_old_buffers() and fsync_dev(), but not in sync_dev()? Is it just to serialize calls to these functions, or is there some other reason? Since this use of the BKL is one of the causes of high preemption latency in a preempt