hello,
we're looking for some input regarding expanding fcntl(2) file leases
somewhat, in order to implement NFSv4 file delegations.
somewhat similar to Samba and OPLOCKs, NFSv4 file delegations are
implemented with leases. however, the current lease subsystem only breaks
leases (and thereby delegations) when a file is truncated or is opened with a
mode that conflicts with an existing lease. for NFSv4, delegations must also
be revoked when a file is renamed, unlinked, or has a metadata change from a
chown, e.g.
thus far, we've come up with three ways -- all with trade-offs -- to do
this that we think avoid races between lease-granting and lease-breaking. a
very brief** summary of each:
- modify struct inode by adding a counter -- callers increment to block
lease-granting; grant leases iff the counter == 0.
- create a new flavor of struct file_lock that blocks lease-granting.
- modify struct file_lock by adding a counter, similar to the above. a
lease-breaker increments the counters on lease file_locks it's breaking;
lease-granting is disallowed if any file_lock's counter is nonzero. the
lease-breaker becomes responsible for freeing these locks.
clearly, these aren't minor changes. we would greatly appreciate any
advice, criticism, or commentary.
thanks much,
d
.
**: for more information, please see some dev notes at:
http://www.citi.umich.edu/u/richterd/vfs_leases.html
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html