From 4a737615cfc55cbdb0beb1c413e054c268044d54 Mon Sep 17 00:00:00 2001 From: Li Xi Date: Thu, 21 May 2015 17:40:47 +0800 Subject: [PATCH] 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 --- lustre/utils/liblustreapi.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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: -- 1.8.3.1