locks: add lock cancel command
Quoted 10 lines · J. Bruce Fields
From: Marc Eshel <[email protected]> - unquoted
Lock managers need to be able to cancel pending lock requests. In the case where the exported filesystem manages its own locks, it's not sufficient just to call
posix_unblock_lock(); we need to let the filesystem know what's happening too.We do this by adding a new fcntl lock command:
FL_CANCELLK. Some day this might also be made available to userspace applications that could benefit from an asynchronous locking api.
Should we really add more and more subcases to ->lock that probably don't share implementation code? I'd much prefer adding different operations.
Quoted 7 lines · Christoph Hellwig
Quoted 3 lines · J. Bruce Fields
We do this by adding a new fcntl lock command:
FL_CANCELLK. Some day this might also be made available to userspace applications that could benefit from an asynchronous locking api.Should we really add more and more subcases to ->lock that probably don't share implementation code? I'd much prefer adding different operations.
That'd be OK. We considered both--
http://marc.info/?l=linux-fsdevel&m=116616992004056&w=2
--but chose a new ->lock case just because that might provide a cleaner mapping to the userspace interface if we ended up doing that some day.
Is there any hard reason why it wouldn't work?
--b.