MDT should also check default LMV EA size when setting reply EA
size, otherwise the following xattr get will not be able to hold
default LMV EA in its reply buffer.
Add test cases to verify default stripe count.
Minor cleanup for the output of default LMV EA.
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I2f94d6e87ba05720e5e4aa694dce3246d6a27664
Reviewed-on: http://review.whamcloud.com/10338
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if (S_ISDIR(lu_object_attr(&mdt_object_child(o)->mo_lu))) {
rc2 = mo_xattr_get(env, mdt_object_child(o), &LU_BUF_NULL,
XATTR_NAME_LMV);
if (S_ISDIR(lu_object_attr(&mdt_object_child(o)->mo_lu))) {
rc2 = mo_xattr_get(env, mdt_object_child(o), &LU_BUF_NULL,
XATTR_NAME_LMV);
+
+ if (rc2 == -ENODATA)
+ rc2 = mo_xattr_get(env, mdt_object_child(o),
+ &LU_BUF_NULL,
+ XATTR_NAME_DEFAULT_LMV);
+
if ((rc2 < 0 && rc2 != -ENODATA) || (rc2 > rc))
rc = rc2;
}
if ((rc2 < 0 && rc2 != -ENODATA) || (rc2 > rc))
rc = rc2;
}
$LFS setdirstripe -D -c $MDSCOUNT -t all_char $DIR/$tdir/striped_dir ||
error "set default stripe on striped dir error"
$LFS setdirstripe -D -c $MDSCOUNT -t all_char $DIR/$tdir/striped_dir ||
error "set default stripe on striped dir error"
+ stripe_count=$($LFS getdirstripe -D -c $DIR/$tdir/striped_dir)
+ [ $stripe_count -eq $MDSCOUNT ] ||
+ error "default stripe wrong expect $MDSCOUNT get $stripe_count"
+
mkdir -p $DIR/$tdir/striped_dir/{test1,test2,test3,test4}
for dir in $(find $DIR/$tdir/striped_dir/*); do
mkdir -p $DIR/$tdir/striped_dir/{test1,test2,test3,test4}
for dir in $(find $DIR/$tdir/striped_dir/*); do
- if (!(verbose & VERBOSE_OBJID))
+ if (!(verbose & VERBOSE_OBJID) || lum->lum_magic == LMV_USER_MAGIC)
llapi_printf(LLAPI_MSG_NORMAL, "\n");
}
llapi_printf(LLAPI_MSG_NORMAL, "\n");
}