Whamcloud - gitweb
LU-19070 dne: dir migrate allowed only for root 74/59474/5
authorAlexander Zarochentsev <alexander.zarochentsev@hpe.com>
Wed, 28 May 2025 17:29:26 +0000 (17:29 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 12 Jun 2025 06:33:29 +0000 (06:33 +0000)
commit07963781a918ada7911e11c02e5e4f1a096e4bbb
treea09ffac2123017df5ffba55a9da8f6e4180a12a6
parent678e2bb63174cf9b4db0d47e1de671ad44b36643
LU-19070 dne: dir migrate allowed only for root

Current implemetation of lfs migrate -m
relies on setxttr(, "trusted.lmv", ) which is
allowed only for users with CAP_SYS_ADMIN capability.
Adding the same check to ll_migrate() will prevent
incomplete migrations from a non-root user.
Add error reporting to cb_migrate_mdt_fini().

Fixes: 0a83d948f3 ("LU-4684 migrate: shrink dir layout after migration")
Fixes: 2dae2b8ffb ("LU-8777 mdt: add parameter to disable remote/striped dir")
HPE-bug-id: LUS-12895
Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Change-Id: I58d417b64e2b634d76e4ad38685deb21d9ce8a86
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59474
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/utils/liblustreapi.c