Whamcloud - gitweb
LU-1866 lfsck: general framework for LFSCK 1.5
[fs/lustre-release.git] / lustre / include / lustre / lustre_idl.h
index d701085..8226334 100644 (file)
@@ -833,11 +833,27 @@ static inline int lu_fid_cmp(const struct lu_fid *f0,
  * enumeration.
  */
 enum lu_dirent_attrs {
-        LUDA_FID        = 0x0001,
-        LUDA_TYPE       = 0x0002,
-        LUDA_64BITHASH  = 0x0004,
+       LUDA_FID                = 0x0001,
+       LUDA_TYPE               = 0x0002,
+       LUDA_64BITHASH          = 0x0004,
+
+       /* The following attrs are used for MDT interanl only,
+        * not visible to client */
+
+       /* Verify the dirent consistency */
+       LUDA_VERIFY             = 0x8000,
+       /* Only check but not repair the dirent inconsistency */
+       LUDA_VERIFY_DRYRUN      = 0x4000,
+       /* The dirent has been repaired, or to be repaired (dryrun). */
+       LUDA_REPAIR             = 0x2000,
+       /* The system is upgraded, has beed or to be repaired (dryrun). */
+       LUDA_UPGRADE            = 0x1000,
+       /* Ignore this record, go to next directly. */
+       LUDA_IGNORE             = 0x0800,
 };
 
+#define LU_DIRENT_ATTRS_MASK   0xf800
+
 /**
  * Layout of readdir pages, as transmitted on wire.
  */
@@ -1179,6 +1195,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_NANOSEC_TIME 0x800000000000ULL /* nanosecond timestamps */
 #define OBD_CONNECT_LIGHTWEIGHT 0x1000000000000ULL/* lightweight connection */
 #define OBD_CONNECT_SHORTIO     0x2000000000000ULL/* short io */
+#define OBD_CONNECT_PINGLESS   0x4000000000000ULL/* pings not required */
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
  * flag value is not in use on some other branch.  Please clear any such
@@ -1218,7 +1235,8 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                OBD_CONNECT_64BITHASH | OBD_CONNECT_JOBSTATS | \
                                OBD_CONNECT_EINPROGRESS | \
                                OBD_CONNECT_LIGHTWEIGHT | OBD_CONNECT_UMASK | \
-                               OBD_CONNECT_LVB_TYPE | OBD_CONNECT_LAYOUTLOCK)
+                               OBD_CONNECT_LVB_TYPE | OBD_CONNECT_LAYOUTLOCK |\
+                               OBD_CONNECT_PINGLESS)
 #define OST_CONNECT_SUPPORTED  (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
                                 OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
                                 OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \
@@ -1234,11 +1252,12 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
                                OBD_CONNECT_EINPROGRESS | \
                                OBD_CONNECT_JOBSTATS | \
                                OBD_CONNECT_LIGHTWEIGHT | OBD_CONNECT_LVB_TYPE|\
-                               OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_FID)
+                               OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_FID | \
+                               OBD_CONNECT_PINGLESS)
 #define ECHO_CONNECT_SUPPORTED (0)
 #define MGS_CONNECT_SUPPORTED  (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \
                                OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV | \
-                               OBD_CONNECT_MNE_SWAB)
+                               OBD_CONNECT_MNE_SWAB | OBD_CONNECT_PINGLESS)
 
 /* Features required for this version of the client to work with server */
 #define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_IBITS | OBD_CONNECT_FID | \
@@ -1878,14 +1897,14 @@ typedef enum {
  */
 
 typedef enum {
-        REINT_SETATTR  = 1,
-        REINT_CREATE   = 2,
-        REINT_LINK     = 3,
-        REINT_UNLINK   = 4,
-        REINT_RENAME   = 5,
-        REINT_OPEN     = 6,
-        REINT_SETXATTR = 7,
-//      REINT_CLOSE    = 8,
+       REINT_SETATTR  = 1,
+       REINT_CREATE   = 2,
+       REINT_LINK     = 3,
+       REINT_UNLINK   = 4,
+       REINT_RENAME   = 5,
+       REINT_OPEN     = 6,
+       REINT_SETXATTR = 7,
+       REINT_RMENTRY  = 8,
 //      REINT_WRITE    = 9,
         REINT_MAX
 } mds_reint_t, mdt_reint_t;
@@ -1909,8 +1928,9 @@ extern void lustre_swab_generic_32s (__u32 *val);
 #define MDS_INODELOCK_UPDATE 0x000002       /* size, links, timestamps */
 #define MDS_INODELOCK_OPEN   0x000004       /* For opened files */
 #define MDS_INODELOCK_LAYOUT 0x000008       /* for layout */
+#define MDS_INODELOCK_PERM   0x000010       /* for permission */
 
-#define MDS_INODELOCK_MAXSHIFT 3
+#define MDS_INODELOCK_MAXSHIFT 4
 /* This FULL lock is useful to take on unlink sort of operations */
 #define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1)