From 151ecffebc5dc838c106f6fbce806b5cb9d6a909 Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 24 Oct 2006 07:46:04 +0000 Subject: [PATCH] - remove pdirops defines. Now it is active all the time without any keys in configure. --- lustre/autoconf/lustre-core.m4 | 18 ------------------ lustre/llite/dir.c | 4 ---- lustre/mdc/mdc_locks.c | 8 -------- lustre/mdt/mdt_handler.c | 10 ---------- lustre/mdt/mdt_internal.h | 6 ------ 5 files changed, 46 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 34fe075..a406ee9 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -796,24 +796,6 @@ fi ]) # -# LC_CONFIG_PDIROPS -# -# whether to enable PDIROPS -# -AC_DEFUN([LC_CONFIG_PDIROPS], -[ -AC_MSG_CHECKING([whether to enable PDIROPS]) -AC_ARG_ENABLE([pdirops], - AC_HELP_STRING([--disable-pdirops], - [disable PDIROPS]), - [],[enable_pdirops='yes']) -AC_MSG_RESULT([$enable_pdirops]) -if test x$enable_pdirops != xno; then - AC_DEFINE(CONFIG_PDIROPS, 1, [enable PDIROPS]) -fi -]) - -# # LC_CONFIG_LDISKFS # # whether to enable various ldiskfs debugs diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 0a118ab..cfe67c0 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -285,11 +285,7 @@ static struct page *ll_get_dir_page(struct inode *dir, __u32 hash, int exact, __u32 start; __u32 end; -#if 1 mode = LCK_PR; -#else - mode = LCK_CR; -#endif rc = md_lock_match(ll_i2sbi(dir)->ll_md_exp, LDLM_FL_BLOCK_GRANTED, ll_inode2fid(dir), LDLM_IBITS, &policy, mode, &lockh); if (!rc) { diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 7e8881a..3c7af50 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -64,19 +64,11 @@ static int it_to_lock_mode(struct lookup_intent *it) { ENTRY; -#if 1 /* CREAT needs to be tested before open (both could be set) */ if (it->it_op & IT_CREAT) return LCK_PW; else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP)) return LCK_PR; -#else - /* CREAT needs to be tested before open (both could be set) */ - if (it->it_op & IT_CREAT) - return LCK_CW; - else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP)) - return LCK_CR; -#endif LBUG(); RETURN(-EINVAL); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index d25a01b..50c6b9d 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -155,7 +155,6 @@ void mdt_set_disposition(struct mdt_thread_info *info, rep->lock_policy_res1 |= flag; } -#if 1 static mdl_mode_t mdt_mdl_lock_modes[] = { [0] = MDL_MINMODE, [1] = MDL_EX, @@ -197,7 +196,6 @@ static inline ldlm_mode_t mdt_mdl_mode2ldlm_mode(mdl_mode_t mode) LASSERT(idx < ARRAY_SIZE(mdt_ldlm_lock_modes)); return mdt_ldlm_lock_modes[idx]; } -#endif void mdt_lock_reg_init(struct mdt_lock_handle *lh, ldlm_mode_t lm) { @@ -221,7 +219,6 @@ void mdt_lock_pdo_init(struct mdt_lock_handle *lh, ldlm_mode_t lm, } } -#if 1 static ldlm_mode_t mdt_lock_pdo_mode(struct mdt_thread_info *info, struct mdt_object *o, ldlm_mode_t lm) @@ -286,7 +283,6 @@ static ldlm_mode_t mdt_lock_pdo_mode(struct mdt_thread_info *info, return LCK_MINMODE; } -#endif static int mdt_getstatus(struct mdt_thread_info *info) { @@ -1580,7 +1576,6 @@ int mdt_object_lock(struct mdt_thread_info *info, struct mdt_object *o, memset(policy, 0, sizeof *policy); fid_build_reg_res_name(mdt_object_fid(o), res_id); -#if 1 /* * Take PDO lock on whole directory and build correct @res_id for lock * on part of directory. @@ -1606,7 +1601,6 @@ int mdt_object_lock(struct mdt_thread_info *info, struct mdt_object *o, */ res_id->name[LUSTRE_RES_ID_HSH_OFF] = lh->mlh_pdo_hash; } -#endif policy->l_inodebits.bits = ibits; @@ -1618,12 +1612,10 @@ int mdt_object_lock(struct mdt_thread_info *info, struct mdt_object *o, rc = mdt_fid_lock(ns, &lh->mlh_reg_lh, lh->mlh_reg_mode, policy, res_id, LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB); -#if 1 if (rc && lh->mlh_type == MDT_PDO_LOCK) { mdt_fid_unlock(&lh->mlh_pdo_lh, lh->mlh_pdo_mode); lh->mlh_pdo_lh.cookie = 0ull; } -#endif RETURN(rc); } @@ -1639,14 +1631,12 @@ void mdt_object_unlock(struct mdt_thread_info *info, struct mdt_object *o, struct ptlrpc_request *req = mdt_info_req(info); ENTRY; -#if 1 if (lustre_handle_is_used(&lh->mlh_pdo_lh)) { /* Do not save PDO locks to request, just decref. */ mdt_fid_unlock(&lh->mlh_pdo_lh, lh->mlh_pdo_mode); lh->mlh_pdo_lh.cookie = 0; } -#endif if (lustre_handle_is_used(&lh->mlh_reg_lh)) { if (decref) { diff --git a/lustre/mdt/mdt_internal.h b/lustre/mdt/mdt_internal.h index 28435f9..7c4cd96 100644 --- a/lustre/mdt/mdt_internal.h +++ b/lustre/mdt/mdt_internal.h @@ -707,15 +707,9 @@ static inline void mdt_set_capainfo(struct mdt_thread_info *info, int offset, ci->mc_capa[offset] = capa; } -#if 1 #define MDT_RD_LOCK LCK_PR #define MDT_WR_LOCK LCK_PW #define MDT_EX_LOCK LCK_EX -#else -#define MDT_RD_LOCK LCK_CR -#define MDT_WR_LOCK LCK_EX -#define MDT_EX_LOCK LCK_EX -#endif #endif /* __KERNEL__ */ #endif /* _MDT_H */ -- 1.8.3.1