Whamcloud - gitweb
0. increase OST_MIN_PRECREATE; 1. move fid_res_name_eq() to lustre_fid.h and use...
authornikita <nikita>
Mon, 30 Oct 2006 17:29:50 +0000 (17:29 +0000)
committernikita <nikita>
Mon, 30 Oct 2006 17:29:50 +0000 (17:29 +0000)
lustre/include/lustre/lustre_idl.h
lustre/include/lustre_fid.h

index 677df05..a7438ff 100644 (file)
@@ -243,7 +243,7 @@ static inline int fid_is_sane(const struct lu_fid *fid)
 {
         return
                 fid != NULL &&
-                ((fid_seq_is_sane(fid_seq(fid)) && fid_oid(fid) != 0 
+                ((fid_seq_is_sane(fid_seq(fid)) && fid_oid(fid) != 0
                                                 && fid_ver(fid) == 0) ||
                 fid_is_igif(fid));
 }
@@ -799,7 +799,7 @@ extern void lustre_swab_obd_statfs (struct obd_statfs *os);
 
 #define OBD_OBJECT_EOF 0xffffffffffffffffULL
 
-#define OST_MIN_PRECREATE 32
+#define OST_MIN_PRECREATE 16384
 #define OST_MAX_PRECREATE 20000
 
 struct obd_ioobj {
@@ -1895,17 +1895,6 @@ typedef enum {
         QUOTA_DQREL     = 602,
 } quota_cmd_t;
 
-/*
- * Return true if resource is for object identified by fid.
- */
-static inline int fid_res_name_eq(const struct lu_fid *f,
-                                  const struct ldlm_res_id *name)
-{
-        return name->name[0] == fid_seq(f) &&
-                name->name[1] == fid_oid(f) &&
-                name->name[2] == fid_ver(f);
-}
-
 #define JOIN_FILE_ALIGN 4096
 
 /* security opcodes */
index 75873e7..6ce7c4d 100644 (file)
@@ -221,6 +221,19 @@ fid_build_reg_res_name(const struct lu_fid *f,
         return name;
 }
 
+/*
+ * Return true if resource is for object identified by fid.
+ */
+static inline int fid_res_name_eq(const struct lu_fid *f,
+                                  const struct ldlm_res_id *name)
+{
+        return
+                name->name[LUSTRE_RES_ID_SEQ_OFF] == fid_seq(f) &&
+                name->name[LUSTRE_RES_ID_OID_OFF] == fid_oid(f) &&
+                name->name[LUSTRE_RES_ID_VER_OFF] == fid_ver(f);
+}
+
+
 static inline struct ldlm_res_id *
 fid_build_pdo_res_name(const struct lu_fid *f,
                        unsigned int hash,