])
#
-# 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
{
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);
rep->lock_policy_res1 |= flag;
}
-#if 1
static mdl_mode_t mdt_mdl_lock_modes[] = {
[0] = MDL_MINMODE,
[1] = MDL_EX,
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)
{
}
}
-#if 1
static ldlm_mode_t mdt_lock_pdo_mode(struct mdt_thread_info *info,
struct mdt_object *o,
ldlm_mode_t lm)
return LCK_MINMODE;
}
-#endif
static int mdt_getstatus(struct mdt_thread_info *info)
{
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.
*/
res_id->name[LUSTRE_RES_ID_HSH_OFF] = lh->mlh_pdo_hash;
}
-#endif
policy->l_inodebits.bits = ibits;
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);
}
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) {
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 */