From: Li Xi Date: Thu, 21 May 2015 09:40:47 +0000 (+0800) Subject: LU-6626 utils: lfs_getstripe prints empty pool name X-Git-Tag: 2.7.55~44 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4a737615cfc55cbdb0beb1c413e054c268044d54;p=fs%2Flustre-release.git LU-6626 utils: lfs_getstripe prints empty pool name When the stripe version is V3, yet pool name is empty, the lfs getstripe command will prints an empty pool name. That is confusing since the user might think there is a pool for this directory. Signed-off-by: Li Xi Change-Id: I4338362331bc958686464bfdfea647c90244f818 Reviewed-on: http://review.whamcloud.com/14906 Tested-by: Jenkins Reviewed-by: Dmitry Eremin Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index edd14a2..a16257d 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -2648,7 +2648,8 @@ void llapi_lov_dump_user_lmm(struct find_param *param, char *path, int is_dir) strlcpy(pool_name, lmmv3->lmm_pool_name, sizeof(pool_name)); objects = lmmv3->lmm_objects; - lov_dump_user_lmm_v1v3(¶m->fp_lmd->lmd_lmm, pool_name, + lov_dump_user_lmm_v1v3(¶m->fp_lmd->lmd_lmm, + pool_name[0] == '\0' ? NULL : pool_name, objects, path, is_dir, param->fp_obd_index, param->fp_max_depth, param->fp_verbose, param->fp_raw); @@ -2661,9 +2662,10 @@ void llapi_lov_dump_user_lmm(struct find_param *param, char *path, int is_dir) lum = (struct lmv_user_md *)param->fp_lmv_md; strlcpy(pool_name, lum->lum_pool_name, sizeof(pool_name)); - lmv_dump_user_lmm(lum, pool_name, path, - param->fp_obd_index, param->fp_max_depth, - param->fp_verbose); + lmv_dump_user_lmm(lum, + pool_name[0] == '\0' ? NULL : pool_name, + path, param->fp_obd_index, + param->fp_max_depth, param->fp_verbose); break; } default: