From 4533ac22c5a0045ddcb0dc3085aa4670ef764aa8 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 30 Oct 2006 17:29:50 +0000 Subject: [PATCH] 0. increase OST_MIN_PRECREATE; 1. move fid_res_name_eq() to lustre_fid.h and use offset constants in it. --- lustre/include/lustre/lustre_idl.h | 15 ++------------- lustre/include/lustre_fid.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index 677df05..a7438ff 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -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 */ diff --git a/lustre/include/lustre_fid.h b/lustre/include/lustre_fid.h index 75873e7..6ce7c4d 100644 --- a/lustre/include/lustre_fid.h +++ b/lustre/include/lustre_fid.h @@ -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, -- 1.8.3.1