Whamcloud - gitweb
LU-18082 utils: fid2path support for path exceeding PATH_MAX 97/55897/4
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 31 Jul 2024 14:03:52 +0000 (16:03 +0200)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:01:03 +0000 (22:01 +0000)
commitf5251cb7af4cfae8f2e9e7f69251253c0bc233b6
tree1f43fb96ff8c5a5cba56efe76215500488ad77b1
parent90c021417d2a16efb5dd6968b2e0c056b5a897fc
LU-18082 utils: fid2path support for path exceeding PATH_MAX

PATH_MAX affects the path length of a single pathname, but it is
possible to exceed this by eg. creating a subdirectory tree, then cd
into it, then create a deep tree below this using a relative pathname.

So fix ll_fid2path and lfs_fid2path to not limit the output buffer to
PATH_MAX.

Add sanity test_154i to exercise this.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ic3a0e3ac1e806e45eb4c72c571f33404c60d0df5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55897
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Stephane Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/lmv/lmv_obd.c
lustre/mdt/mdt_handler.c
lustre/tests/sanity.sh
lustre/utils/lfs.c