Whamcloud - gitweb
LU-16721 lfs: Fix path2fid segfault 57/50557/5
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Thu, 6 Apr 2023 07:00:45 +0000 (03:00 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 22 Apr 2023 17:31:45 +0000 (17:31 +0000)
commitadd0aa8a89f8711c13ebb5f0ca22eaf18f95685c
tree4ecc14650b37689c157c9161f131ca22b5e3b47c
parentd2a5f10463fe68be3f9858c876a094d8eeae3726
LU-16721 lfs: Fix path2fid segfault

This patch fixes segfault when calling path2fid
under interactive mode.

Before Patch
============
lfs > path2fid /mnt/lustre/a
[0x200000401:0x1:0x0]
Segmentation fault

After Patch
============
$ lfs
lfs > path2fid /mnt/lustre/a
[0x200000401:0x1:0x0]

lfs > path2fid --parent /mnt/lustre/a
[0x200000007:0x1:0x0]/a
lfs >

Testcase sanity/154h added.

Test-Parameters: trivial testlist=sanity
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I4693e0d476e9e7f570f45fd7a31d275d549245aa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50557
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c