Whamcloud - gitweb
LUDOC-297 protocol: Update protocol document
[doc/protocol.git] / struct_lu_fid.txt
index dc8f76d..c4c7b3e 100644 (file)
@@ -1,10 +1,7 @@
-Lustre File Identifiers
-^^^^^^^^^^^^^^^^^^^^^^^
-[[struct-lu-fid]]
-
-Each resource stored on a target is assigned an identifier that is
-unique to that resource.
 
+.Lustre FID
+[[struct-lu-fid]]
+****
 [source,c]
 --------
 struct lu_fid {
@@ -14,12 +11,10 @@ struct lu_fid {
 };
 --------
 
-A file identifier ('FID') is a 128-bit numbers that uniquely identifies a
-single file or directory on an MDTs or OSTs within a single Lustre file
-system. The FID for a Lustre file or directory is the FID from the
-corresponding MDT entry for the file. Each of the data resource for that
-file will also have a FID for each corresponding OST resource on which the
-file stores data.
+A file identifier ('FID') is a 128-bit number that uniquely identifies a
+resource on an MDT or OST. The FID for the resource on an MDT
+identifies the file as a whole. The FID for a resource on an OST
+identifiess the fragment of a file assigned to that OST.
 
 The 'f_seq' field holds the sequence number, or SEQ, and is used in
 conjunction with the 'FID location database' (FLDB) to
@@ -31,10 +26,12 @@ The 'f_oid' field holds the unique 'object identifier' (OID) within the
 sequence to identify a particular object.
 
 The 'f_ver' value identifies which version of a resource is being
-identified, in the event that the resource is being updated, and
+identified in the event that the resource is being updated, and
 different hosts might be referring to different versions of the same
 resource. It has never been used as of Lustre 2.8.
+****
 
+.FID SEQ
 [source,c]
 ----
 enum fid_seq {
@@ -49,33 +46,23 @@ enum fid_seq {
        FID_SEQ_IGIF_MAX        = 0x0ffffffffULL,
        FID_SEQ_IDIF            = 0x100000000ULL,
        FID_SEQ_IDIF_MAX        = 0x1ffffffffULL,
-       /* Normal FID sequence starts from this value, i.e. 1<<33 */
        FID_SEQ_START           = 0x200000000ULL,
-       /* sequence for local pre-defined FIDs listed in local_oid */
        FID_SEQ_LOCAL_FILE      = 0x200000001ULL,
        FID_SEQ_DOT_LUSTRE      = 0x200000002ULL,
-       /* sequence is used for local named objects FIDs generated
-        * by local_object_storage library */
        FID_SEQ_LOCAL_NAME      = 0x200000003ULL,
-       /* Because current FLD will only cache the fid sequence, instead
-        * of oid on the client side, if the FID needs to be exposed to
-        * clients sides, it needs to make sure all of fids under one
-        * sequence will be located in one MDT. */
        FID_SEQ_SPECIAL         = 0x200000004ULL,
        FID_SEQ_QUOTA           = 0x200000005ULL,
        FID_SEQ_QUOTA_GLB       = 0x200000006ULL,
        FID_SEQ_ROOT            = 0x200000007ULL,  /* Located on MDT0 */
        FID_SEQ_LAYOUT_RBTREE   = 0x200000008ULL,
-       /* sequence is used for update logs of cross-MDT operation */
        FID_SEQ_UPDATE_LOG      = 0x200000009ULL,
-       /* Sequence is used for the directory under which update logs
-        * are created. */
        FID_SEQ_UPDATE_LOG_DIR  = 0x20000000aULL,
        FID_SEQ_NORMAL          = 0x200000400ULL,
        FID_SEQ_LOV_DEFAULT     = 0xffffffffffffffffULL
 };
 ----
 
+****
 There are several reserved ranges of FID sequence values, to allow for
 interoperability with older Lustre filesystems, to identify "well known"
 objects for internal or external use, as well as for future expansion.
@@ -123,3 +110,4 @@ internal to the server that are allocated by name.
 The 'FID_SEQ_NORMAL' (0x200000400+) range is used for normal object
 identifiers.  These objects are visible in the namespace if allocated
 by an MDT, or may be OST objects.
+****