Whamcloud - gitweb
LU-16835 target: server_ioctl() should return ENOTTY 72/51072/3
authorLi Dongyang <dongyangli@ddn.com>
Sat, 20 May 2023 07:41:56 +0000 (17:41 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 22 May 2023 08:40:26 +0000 (08:40 +0000)
commitaadc6de18ed9af8f26cc829faa5643f8b4f0bba7
treeff3ef4257dc61b70f73d78b2042ddd1f8d29eb6c
parent7e252d4c6c7049b16e28359c776d748d74c0ff3c
LU-16835 target: server_ioctl() should return ENOTTY

server_ioctl() returns EOPNOTSUPP when ioctl cmd
is not supported. This will confuse e2fsprogs >= 1.47
as it's trying to get/set fs label using
FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL ioctl.

If the cmd is not supported we really should return
ENOTTY which means "Inappropriate ioctl for device".

Change-Id: Ibca0e6ad9a5c19cc7bd55ebd96cf32af05cf0fb6
Test-Parameters: trivial
Fixes: d5be104cc9 ("LU-11355 lustre: enable fstrim on lustre device")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51072
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/target/tgt_mount.c