#define OBD_CONNECT2_SELINUX_POLICY 0x400ULL /* has client SELinux policy */
#define OBD_CONNECT2_LSOM 0x800ULL /* LSOM support */
#define OBD_CONNECT2_PCC 0x1000ULL /* Persistent Client Cache */
-#define OBD_CONNECT2_PLAIN_LAYOUT 0x2000ULL /* Plain Directory Layout */
#define OBD_CONNECT2_ASYNC_DISCARD 0x4000ULL /* support async DoM data discard */
/* XXX README XXX:
#define LOV_MAGIC LOV_MAGIC_V1
#define LOV_MAGIC_COMP_V1 (0x0BD60000 | LOV_MAGIC_MAGIC)
#define LOV_MAGIC_FOREIGN (0x0BD70000 | LOV_MAGIC_MAGIC)
+#define LOV_MAGIC_SEL (0x0BD80000 | LOV_MAGIC_MAGIC)
/*
* magic for fully defined striping
MDS_HSM_CT_REGISTER = 59,
MDS_HSM_CT_UNREGISTER = 60,
MDS_SWAP_LAYOUTS = 61,
+ MDS_RMFID = 62,
MDS_LAST_OPC
};
#define DISP_OPEN_DENY 0x10000000
/* INODE LOCK PARTS */
-#define MDS_INODELOCK_LOOKUP 0x000001 /* For namespace, dentry etc, and also
- * was used to protect permission (mode,
- * owner, group etc) before 2.4. */
-#define MDS_INODELOCK_UPDATE 0x000002 /* size, links, timestamps */
-#define MDS_INODELOCK_OPEN 0x000004 /* For opened files */
-#define MDS_INODELOCK_LAYOUT 0x000008 /* for layout */
-
-/* The PERM bit is added int 2.4, and it is used to protect permission(mode,
- * owner, group, acl etc), so to separate the permission from LOOKUP lock.
- * Because for remote directories(in DNE), these locks will be granted by
- * different MDTs(different ldlm namespace).
- *
- * For local directory, MDT will always grant UPDATE_LOCK|PERM_LOCK together.
- * For Remote directory, the master MDT, where the remote directory is, will
- * grant UPDATE_LOCK|PERM_LOCK, and the remote MDT, where the name entry is,
- * will grant LOOKUP_LOCK. */
-#define MDS_INODELOCK_PERM 0x000010
-#define MDS_INODELOCK_XATTR 0x000020 /* extended attributes */
-#define MDS_INODELOCK_DOM 0x000040 /* Data for data-on-mdt files */
-
-#define MDS_INODELOCK_MAXSHIFT 6
+enum mds_ibits_locks {
+ MDS_INODELOCK_LOOKUP = 0x000001, /* For namespace, dentry etc. Was
+ * used to protect permission (mode,
+ * owner, group, etc) before 2.4. */
+ MDS_INODELOCK_UPDATE = 0x000002, /* size, links, timestamps */
+ MDS_INODELOCK_OPEN = 0x000004, /* For opened files */
+ MDS_INODELOCK_LAYOUT = 0x000008, /* for layout */
+
+ /* The PERM bit is added in 2.4, and is used to protect permission
+ * (mode, owner, group, ACL, etc.) separate from LOOKUP lock.
+ * For remote directories (in DNE) these locks will be granted by
+ * different MDTs (different LDLM namespace).
+ *
+ * For local directory, the MDT always grants UPDATE|PERM together.
+ * For remote directory, master MDT (where remote directory is) grants
+ * UPDATE|PERM, and remote MDT (where name entry is) grants LOOKUP_LOCK.
+ */
+ MDS_INODELOCK_PERM = 0x000010,
+ MDS_INODELOCK_XATTR = 0x000020, /* non-permission extended attrs */
+ MDS_INODELOCK_DOM = 0x000040, /* Data for Data-on-MDT files */
+ /* Do not forget to increase MDS_INODELOCK_NUMBITS when adding bits */
+};
+#define MDS_INODELOCK_NUMBITS 7
/* This FULL lock is useful to take on unlink sort of operations */
-#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1)
+#define MDS_INODELOCK_FULL ((1 << MDS_INODELOCK_NUMBITS) - 1)
/* DOM lock shouldn't be canceled early, use this macro for ELC */
#define MDS_INODELOCK_ELC (MDS_INODELOCK_FULL & ~MDS_INODELOCK_DOM)
#define LMV_MAGIC_STRIPE 0x0CD40CD0 /* magic for dir sub_stripe */
#define LMV_MAGIC_FOREIGN 0x0CD50CD0 /* magic for lmv foreign */
-/* Right now only the lower part(0-16bits) of lmv_hash_type is being used,
- * and the higher part will be the flag to indicate the status of object,
- * for example the object is being migrated. And the hash function
- * might be interpreted differently with different flags. */
-#define LMV_HASH_TYPE_MASK 0x0000ffff
-
-#define LMV_HASH_FLAG_MIGRATION 0x80000000
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 12, 57, 0)
-/* Since lustre 2.8, this flag will not be needed, instead this DEAD
- * and orphan flags will be stored in LMA (see LMAI_ORPHAN)
- * Keep this flag just for LFSCK, because it still might meet such
- * flag when it checks the old FS */
-#define LMV_HASH_FLAG_DEAD 0x40000000
-#endif
-#define LMV_HASH_FLAG_BAD_TYPE 0x20000000
-
-/* The striped directory has ever lost its master LMV EA, then LFSCK
- * re-generated it. This flag is used to indicate such case. It is an
- * on-disk flag. */
-#define LMV_HASH_FLAG_LOST_LMV 0x10000000
-
/**
* The FNV-1a hash algorithm is as follows:
* hash = FNV_offset_basis