Whamcloud - gitweb
LUDOC-276 protocol: Document RPCs for setattr
[doc/protocol.git] / early_lock_cancellation.txt
1 Early Lock Cancellation
2 -----------------------
3 [[early-lock-cancellation]]
4
5 In some circumstances (see <<mds-reint-setattr-rpc>>) a client holding
6 a lock "knows" that the operation it is initiating will necessitate
7 canceling a lock that it holds. In such a circumstance the lock is
8 said to be "in conflict" with the operation. For example, a side
9 effect of the GNU 'fileutils' is that it always issues a 'stat' prior
10 to other update operations, so when issuing an update to a resource
11 attribute on the MDT a) the client will already have a read lock on
12 the resource, and b) the MDT will then need a lock on that same
13 resource in order to perform the update. Rather than waiting for an
14 additional round of RPCs to carry out the lock cancellation (on the
15 client) the RPC requesting the update can include a cancellation of
16 the lock as part of its request. This proactive lock cancellation is
17 called "early lock cancellation" or sometimes ELC.
18