the capability grants.
::
+
/* generic cap bits */
#define CEPH_CAP_GSHARED 1 /* client can reads (s) */
#define CEPH_CAP_GEXCL 2 /* client can read and update (x) */
the inode's data or metadata on which the capability is being granted:
::
+
/* per-lock shift */
#define CEPH_CAP_SAUTH 2 /* A */
#define CEPH_CAP_SLINK 4 /* L */
bits.
::
+
| AUTH | LINK | XATTR | FILE
2 4 6 8
each bit value and shifting to the correct bit in the word:
::
+
#define CEPH_CAP_AUTH_SHARED (CEPH_CAP_GSHARED << CEPH_CAP_SAUTH)
These bits can then be or'ed together to make a bitmask denoting a set of
There is one exception:
::
+
#define CEPH_CAP_PIN 1 /* no specific capabilities beyond the pin */
The "pin" just pins the inode into memory, without granting any other caps.
Graphically:
::
+
+---+---+---+---+---+---+---+---+
| p | _ |As x |Ls x |Xs x |
+---+---+---+---+---+---+---+---+