On Wed, May 02, 2001 at 04:49:30PM +0200, Andi Kleen wrote:
> On Mon, Apr 30, 2001 at 12:39:23PM -0600, Matthew Wilcox wrote:
> > * All filesystems will fill in their ->lock method.
>
> Why when a common stub should work for 90% of them? Please keep
> global search-and-edit operation low when not absolutely possible.
I think this will be one of the more minor changes that filesystems will
see during 2.5 :-)
> > * Local filesystems should all use local_lock() for this method,
> > unless they have a good reason to provide their own facilities.
>
>
> So this should be default for ->lock
Perhaps we misunderstand one another? I propose most filesystems should do
struct file_operations {
...
lock: local_lock
}
and I think you're proposing
if (i_fop->lock)
i_fop->lock();
else
local_lock();
please correct me if I'm wrong.
> > A clustered filesystem might call out to the network and say `I want
> > to put this lock on this file'. Either some other node in the cluster
> > says `Denied', `Blocked' or `Granted' (ie handles the request), OR no
> > other node accepts responsibility for the lock, in which case we lock
> > it locally by calling local_lock().
>
> It would be nice if it was possible to interface it to the distributed lock
> manager IBM has recently GPLed...
It would. I hadn't heard that got released, I shall investigate.
> It's still linear lists I guess? Any evidence that a hash table or a ternary
> search tree makes sense?
I'm not going to change it from a linear list until I've made these other
changes. In the meantime, if anyone knows of a data structure which lets me
record ranges and check for overlaps, let me know...
> I would add a printk warning that fires 10 times, then you can get rid
> of it.
They're only supported for the benefit of really old applications (ie
stuff that runs under iBCS). We could probably drop them or make them a
config option. I've never met anyone who mounts their filesystems with
-o mand :-)
> I never understood why you can't do it completely inode local protected
> by the inode lock; but then I don't claim that I understand fs/locks.c
inode_lock claims it's for protecting the list manipulations, not for
protecting any element in an individual inode. Though in practice it
seems to be used for protecting i_state as well. I think I'd rather use
a different lock to protect i_flock -- inode_lock is probably already
highly contended.
> Or just walk the inode hash ?
yes, could do that. but /proc/locks really ought to die. i don't see why
we need to expose kernel addresses to userspace. the extreme security
people have also voiced concerns about the covert channel involved and
the way this can be used to spy on other processes.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]