From 94e142711c37c5276553f98ca4792734d8c92a12 Mon Sep 17 00:00:00 2001 From: Vitaliy Kuznetsov Date: Tue, 23 Jan 2024 13:34:40 +0100 Subject: [PATCH] EX-9007 lipe: Fix getting client mount path This patch fixes an issue where when the client is not mounted, size reports do not work. Test-Parameters: trivial testlist=sanity-lipe-scan3 Signed-off-by: Vitaliy Kuznetsov Change-Id: I1e99fddf21960ecd14526c0d6baeb75c2a138dd8 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53763 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lipe/src/lipe_scan3/ls3_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lipe/src/lipe_scan3/ls3_main.c b/lipe/src/lipe_scan3/ls3_main.c index 8524c42..a083510 100644 --- a/lipe/src/lipe_scan3/ls3_main.c +++ b/lipe/src/lipe_scan3/ls3_main.c @@ -1048,8 +1048,9 @@ SCM_DEFINE(ls3_scm_collect_fsize_stats, LS3_COLLECT_STATS, 0, 1, 0, reports_with_stats->block_size = li->block_size; reports_with_stats->inodes_count = li->inodes_count; reports_with_stats->free_inodes_count = li->free_inodes_count; - reports_with_stats->client_mount_path = - xstrdup(li->li_client_mount_path); + if (li->li_client_mount_path != NULL) + reports_with_stats->client_mount_path = + xstrdup(li->li_client_mount_path); reports_with_stats->device_is_mdt = li->li_device_is_mdt; /* else OST */ } -- 1.8.3.1