Re: [RFC] Patch to allow distributed flock

From: Trond Myklebust
Date: Thu Jun 24 2004 - 20:39:38 EST


På to , 24/06/2004 klokka 20:07, skreiv Ken Preslan:

> If the FS is managing the posix locks and/or flocks, is there really a
> reason to acquire the VFS versions of the locks too? As long as there is
> some bit set that tells the VFS to call down into the FS to unlock the
> locks on process exit, keeping both sets of locks seems wasteful.
> What am I missing?

The only reason we care in NFS is in order to be able to deal with
server reboot recovery -- which requires you to have an extensive list
of all locks that are held -- and, as you note above, in order to ensure
that locks are all cleared upon process exit.

For flock() locks, I agree: you can probably whittle that information
down to a single bit per open file. For POSIX locks, you need the byte
ranges and lockowner/pid information too...

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/