Whamcloud - gitweb
LU-3285 merge: 'dom' branch merging
[fs/lustre-release.git] / lustre / mdt / mdt_open.c
index 76555b5..2b6ee7d 100644 (file)
@@ -1319,17 +1319,12 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
                result = mdt_cross_open(info, rr->rr_fid2, rr->rr_fid1,
                                        ldlm_rep, create_flags);
                GOTO(out, result);
-       } else if (req_is_replay(req) ||
-           (req->rq_export->exp_libclient && create_flags & MDS_OPEN_HAS_EA)) {
-               /* This is a replay request or from liblustre with ea. */
+       } else if (req_is_replay(req)) {
                result = mdt_open_by_fid(info, ldlm_rep);
 
-               if (result != -ENOENT) {
-                       if (req->rq_export->exp_libclient &&
-                           create_flags & MDS_OPEN_HAS_EA)
-                               GOTO(out, result = 0);
+               if (result != -ENOENT)
                        GOTO(out, result);
-               }
+
                /* We didn't find the correct object, so we need to re-create it
                 * via a regular replay. */
                if (!(create_flags & MDS_OPEN_CREAT)) {
@@ -1705,7 +1700,7 @@ static inline int mdt_hsm_set_released(struct lov_mds_md *lmm)
        __u32   off;
        int     i;
 
-       if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_COMP_V1_DEF)) {
+       if (lmm->lmm_magic == cpu_to_le32(LOV_MAGIC_COMP_V1_DEFINED)) {
                comp_v1 = (struct lov_comp_md_v1 *)lmm;
 
                if (comp_v1->lcm_entry_count == 0)
@@ -1810,17 +1805,17 @@ static int mdt_hsm_release(struct mdt_thread_info *info, struct mdt_object *o,
        if (!(ma->ma_valid & MA_LOV)) {
                /* Even empty file are released */
                memset(ma->ma_lmm, 0, sizeof(*ma->ma_lmm));
-               ma->ma_lmm->lmm_magic = cpu_to_le32(LOV_MAGIC_V1_DEF);
+               ma->ma_lmm->lmm_magic = cpu_to_le32(LOV_MAGIC_V1_DEFINED);
                ma->ma_lmm->lmm_pattern = cpu_to_le32(LOV_PATTERN_RAID0);
                ma->ma_lmm->lmm_stripe_size = cpu_to_le32(LOV_MIN_STRIPE_SIZE);
                ma->ma_lmm_size = sizeof(*ma->ma_lmm);
        } else {
-               /* Magic must be LOV_MAGIC_*_DEF otherwise LOD will interpret
+               /* Magic must be LOV_MAGIC_*_DEFINED or LOD will interpret
                 * ma_lmm as lov_user_md, then it will be confused by union of
                 * layout_gen and stripe_offset. */
                if ((le32_to_cpu(ma->ma_lmm->lmm_magic) & LOV_MAGIC_MASK) ==
                    LOV_MAGIC_MAGIC)
-                       ma->ma_lmm->lmm_magic |= cpu_to_le32(LOV_MAGIC_DEF);
+                       ma->ma_lmm->lmm_magic |= cpu_to_le32(LOV_MAGIC_DEFINED);
                else
                        GOTO(out_unlock, rc = -EINVAL);
        }