Whamcloud - gitweb
LU-13527 utils: allow OST FID lookup via lfs fid2path 88/58988/11
authorKeguang Xu <squalfof@gmail.com>
Sun, 27 Apr 2025 07:32:00 +0000 (15:32 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:06:15 +0000 (04:06 +0000)
commit5e841700dbada8a49836d416d33b1740e6566384
tree932b1e664c8435885d0f0bb86837aadbf0d05de4
parent925b31e36c3046b5de6b9eacc1f6a8d052690328
LU-13527 utils: allow OST FID lookup via lfs fid2path

We support reverse name lookup of OST FID in addition
to MDT FID via "lfs fid2path",
- we use fld_client_lookup() to tell whether it's OST FID
or MDT FID
- for OST FID, we communicate with the OST that contains
the underlying object with the given FID, retrieve its parent
FID, i.e., the MDT FID, then continue with the MDT FID logic
- for MDT FID, previous logic was kept

NB: The ost_index obtained from fld_client_lookup() is passed
down to the lower layer via u.gf_root_fid, which was initially
taken as a non-functional field in OST context.

Signed-off-by: Keguang Xu <squalfof@gmail.com>
Change-Id: Icdf5cd7bb4693d5fef0b48f83464ca80aab81d1d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58988
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
lustre/fld/fld_request.c
lustre/include/lustre_fld.h
lustre/llite/file.c
lustre/lmv/lmv_fld.c
lustre/lov/lov_obd.c
lustre/lov/lov_object.c
lustre/ofd/ofd_dev.c
lustre/osc/osc_request.c
lustre/tests/sanity.sh