Whamcloud - gitweb
LU-11549 mdd: set LUSTRE_ORPHAN_FL for non-dirs
[fs/lustre-release.git] / lustre / mdt / mdt_open.c
index 33db7d8..bcb7c2f 100644 (file)
@@ -394,7 +394,8 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
                RETURN(rc);
 
        rc = mo_open(info->mti_env, mdt_object_child(o),
-                    created ? open_flags | MDS_OPEN_CREATED : open_flags);
+                    created ? open_flags | MDS_OPEN_CREATED : open_flags,
+                    &info->mti_spec);
        if (rc != 0) {
                /* If we allow the client to chgrp (CFS_SETGRP_PERM), but the
                 * client does not know which suppgid should be sent to the MDS,
@@ -1702,7 +1703,7 @@ static struct mdt_object *mdt_orphan_open(struct mdt_thread_info *info,
                GOTO(out, rc);
        }
 
-       rc = mo_open(env, mdt_object_child(obj), MDS_OPEN_CREATED);
+       rc = mo_open(env, mdt_object_child(obj), MDS_OPEN_CREATED, spec);
        if (rc < 0)
                CERROR("%s: cannot open volatile file "DFID", orphan "
                       "file will be left in PENDING directory until "
@@ -1847,8 +1848,8 @@ static int mdt_hsm_release(struct mdt_thread_info *info, struct mdt_object *o,
                                ma->ma_hsm.mh_flags = HS_ARCHIVED | HS_EXISTS;
                } else {
                        /* Set up HSM attribte for PCC archived object */
-                       CLASSERT(sizeof(struct hsm_attrs) <=
-                                sizeof(info->mti_xattr_buf));
+                       BUILD_BUG_ON(sizeof(struct hsm_attrs) >
+                                    sizeof(info->mti_xattr_buf));
                        buf = &info->mti_buf;
                        buf->lb_buf = info->mti_xattr_buf;
                        buf->lb_len = sizeof(struct hsm_attrs);
@@ -1947,7 +1948,7 @@ static int mdt_hsm_release(struct mdt_thread_info *info, struct mdt_object *o,
        }
 
        /* Set up HSM attribute for orphan object */
-       CLASSERT(sizeof(struct hsm_attrs) <= sizeof(info->mti_xattr_buf));
+       BUILD_BUG_ON(sizeof(struct hsm_attrs) > sizeof(info->mti_xattr_buf));
        buf = &info->mti_buf;
        buf->lb_buf = info->mti_xattr_buf;
        buf->lb_len = sizeof(struct hsm_attrs);
@@ -2017,7 +2018,7 @@ out_unlock:
        }
 
 out_reprocess:
-       ldlm_reprocess_all(lease->l_resource);
+       ldlm_reprocess_all(lease->l_resource, lease);
        LDLM_LOCK_PUT(lease);
 
        ma->ma_valid = 0;
@@ -2180,7 +2181,7 @@ out_unlock_sem:
 out_obj:
        mdt_object_put(info->mti_env, swap_objects ? o1 : o2);
 
-       ldlm_reprocess_all(lease->l_resource);
+       ldlm_reprocess_all(lease->l_resource, lease);
 
 out_lease:
        LDLM_LOCK_PUT(lease);
@@ -2297,7 +2298,7 @@ out_unlock:
                OBD_FREE(resync_ids, resync_count * sizeof(__u32));
 
 out_reprocess:
-       ldlm_reprocess_all(lease->l_resource);
+       ldlm_reprocess_all(lease->l_resource, lease);
        LDLM_LOCK_PUT(lease);
 
        ma->ma_valid = 0;