Whamcloud - gitweb
LU-14459 mdt: support fixed directory layout
[fs/lustre-release.git] / lustre / mdt / mdt_xattr.c
index cc7804f..077363d 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/mdt/mdt_xattr.c
  *
@@ -480,7 +479,7 @@ int mdt_dir_layout_update(struct mdt_thread_info *info)
                }
 
                if (lmu->lum_hash_type &&
-                   lmu->lum_hash_type !=
+                   (lmu->lum_hash_type & cpu_to_le32(LMV_HASH_TYPE_MASK)) !=
                    (lmv->lmv_merge_hash & cpu_to_le32(LMV_HASH_TYPE_MASK))) {
                        CERROR("%s: "DFID" merge hash mismatch %u != %u\n",
                                mdt_obd_name(info->mti_mdt), PFID(rr->rr_fid1),
@@ -503,6 +502,8 @@ int mdt_dir_layout_update(struct mdt_thread_info *info)
 
                lmv->lmv_hash_type &= ~LMV_HASH_FLAG_LAYOUT_CHANGE;
                lmv->lmv_layout_version = cpu_to_le32(++version);
+               lmv->lmv_migrate_offset = 0;
+               lmv->lmv_migrate_hash = 0;
                buf->lb_buf = lmv;
                buf->lb_len = sizeof(*lmv);
                rc = mo_xattr_set(env, mdt_object_child(obj), buf,