Whamcloud - gitweb
LUDOC-296 protocol: Rearrange presentation to be more top-down
[doc/protocol.git] / ldlm_lock_desc.txt
diff --git a/ldlm_lock_desc.txt b/ldlm_lock_desc.txt
deleted file mode 100644 (file)
index 59d03aa..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-LDLM Lock Descriptor
-^^^^^^^^^^^^^^^^^^^^
-[[struct-ldlm-lock-desc]]
-
-The lock descriptor conveys the specific details about a particular
-lock being requested or granted. It appears in
-<<struct-ldlm-request>>.
-
-----
-struct ldlm_lock_desc {
-        struct ldlm_resource_desc l_resource;
-        enum ldlm_mode l_req_mode;
-        enum ldlm_mode l_granted_mode;
-        union ldlm_wire_policy_data l_policy_data;
-};
-----
-
-The 'l_resource' field identifies the resource upon which the lock is
-being requested or granted. See the description of
-<<struct-ldlm-resource-desc>>.
-
-The 'l_req_mode' and 'l_granted_mode' fields give the kind of lock
-being requested and the kind of lock that has been granted. The field
-values are:
-
-----
-enum ldlm_mode {
-        LCK_EX      = 1, /* exclusive */
-        LCK_PW      = 2, /* privileged write */
-        LCK_PR      = 4, /* privileged read */
-        LCK_CW      = 8, /* concurrent write */
-        LCK_CR      = 16, /* concurrent read */
-        LCK_NL      = 32, /* */
-        LCK_GROUP   = 64, /* */
-        LCK_COS     = 128, /* */
-};
-----
-[[struct-ldlm-mode]]
-
-Despite the fact that the lock modes are not overlapping, these lock
-modes are exclusive.  In addition the mode value 0 is the MINMODE,
-i.e. no lock at all.
-
-In a request 'l_req_mode' is the value actually being requested and
-'l_granted_mode' is the value that currently is in place on for the
-requester. In a reply the 'l_req_mode' may be modified if more or
-fewer privileges were granted than requested, and the
-'l_granted_mode' is what has, in fact, been granted.
-
-The 'l_policy_data' field gives the kind of resource being
-requested/granted. It is a union of these struct definitions:
-[[struct-ldlm-wire-policy-data]]
-
-----
-union ldlm_wire_policy_data {
-        struct ldlm_extent l_extent;
-        struct ldlm_flock_wire l_flock;
-        struct ldlm_inodebits l_inodebits;
-};
-----
-
-----
-struct ldlm_extent {
-        __u64 start;
-        __u64 end;
-        __u64 gid;
-};
-----
-[[struct-ldlm-extent]]
-----
-struct ldlm_flock_wire {
-        __u64 lfw_start;
-        __u64 lfw_end;
-        __u64 lfw_owner;
-        __u32 lfw_padding;
-        __u32 lfw_pid;
-};
-----
-[[struct-ldlm-flock-wire]]
-----
-struct ldlm_inodebits {
-        __u64 bits;
-};
-----
-[[struct-ldlm-inodebits]]
-
-Thus the lock may be on an 'extent', a contiguous sequence of bytes
-in a regular file; an 'flock wire', whatever to heck that is; or a
-portion of an inode. For a "plain" lock (or one with no type at all)
-the 'l_policy_data' field has zero length.