/* Only needed for striped dir to fill ..see lmv_read_page() */
if (i_dir) {
struct obd_export *exp = ll_i2mdexp(i_dir);
- __u64 ibits = MDS_INODELOCK_LOOKUP;
+ enum mds_ibits_locks ibits = MDS_INODELOCK_LOOKUP;
if (ll_have_md_lock(exp, i_dir, &ibits, LCK_MINMODE))
pfid = *ll_inode2fid(i_dir);
* \param l_req_mode [IN] searched lock mode
* \retval boolean, true iff all bits are found
*/
-int ll_have_md_lock(struct obd_export *exp, struct inode *inode, __u64 *bits,
- enum ldlm_mode l_req_mode)
+int ll_have_md_lock(struct obd_export *exp, struct inode *inode,
+ enum mds_ibits_locks *bits, enum ldlm_mode l_req_mode)
{
struct lustre_handle lockh;
union ldlm_policy_data policy;
extern const struct inode_operations ll_file_inode_operations;
const struct file_operations *ll_select_file_operations(struct ll_sb_info *sbi);
extern int ll_have_md_lock(struct obd_export *exp, struct inode *inode,
- __u64 *bits, enum ldlm_mode l_req_mode);
+ enum mds_ibits_locks *bits,
+ enum ldlm_mode l_req_mode);
extern enum ldlm_mode ll_take_md_lock(struct inode *inode, __u64 bits,
struct lustre_handle *lockh, __u64 flags,
enum ldlm_mode mode);
RETURN(rc);
}
-static void ll_lock_cancel_bits(struct ldlm_lock *lock, __u64 to_cancel)
+static void ll_lock_cancel_bits(struct ldlm_lock *lock,
+ enum mds_ibits_locks bits)
{
struct inode *inode = ll_inode_from_resource_lock(lock);
struct ll_inode_info *lli;
- __u64 bits = to_cancel;
int rc;
ENTRY;
static int ll_md_need_convert(struct ldlm_lock *lock)
{
struct ldlm_namespace *ns = ldlm_lock_to_ns(lock);
- struct inode *inode;
__u64 wanted = lock->l_policy_data.l_inodebits.cancel_bits;
- __u64 bits = lock->l_policy_data.l_inodebits.bits & ~wanted;
enum ldlm_mode mode = LCK_MINMODE;
+ enum mds_ibits_locks bits;
+ struct inode *inode;
if (!lock->l_conn_export ||
!exp_connect_lock_convert(lock->l_conn_export))
return 0;
+ bits = lock->l_policy_data.l_inodebits.bits & ~wanted;
if (!wanted || !bits || ldlm_is_cancel(lock))
return 0;
switch (flag) {
case LDLM_CB_BLOCKING:
{
- __u64 cancel_flags = LCF_ASYNC;
+ enum ldlm_cancel_flags cancel_flags = LCF_ASYNC;
/* if lock convert is not needed then still have to
* pass lock via ldlm_cli_convert() to keep all states
}
case LDLM_CB_CANCELING:
{
- __u64 to_cancel = lock->l_policy_data.l_inodebits.bits;
+ enum mds_ibits_locks to_cancel =
+ lock->l_policy_data.l_inodebits.bits;
/* Nothing to do for non-granted locks */
if (!ldlm_is_granted(lock))