Whamcloud - gitweb
LU-17489 utils: fix 'lfs getname' ioctl breakage 67/53867/3
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 31 Jan 2024 00:06:36 +0000 (17:06 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:00:24 +0000 (07:00 +0000)
commitd502883826c1d567a866f0ac41fa12c1e7e31c81
treeb2e19ccf297a166f3177e3e7c7bf72af240fd58c
parentb26fc38d256236b8135fc2fab608a366dbda0f73
LU-17489 utils: fix 'lfs getname' ioctl breakage

The removal of the explicit ioctl(OBD_IOC_GETNAME_OLD) fallback
in llapi_file_fget_lov_uuid() caused 'lfs getname' to break when
running against an 2.14 mountpoint missing OBD_IOC_GETDTNAME.

Change this to call llapi_ioctl(OBD_IOC_GETDTNAME) which handles
this compatibility mapping internally.

Also fix the include header ordering to ensure LUSTRE_VERSION_CODE
is defined before including lustre_ioctl_old.h.

Test-Parameters: trivial
Fixes: 0f38a0b9db ("LU-13107 uapi: remove obsolete ioctls")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I944acd498a42ba4882c8391e27f4156cb63ebbe5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53867
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_ioctl.c