Whamcloud - gitweb
LU-17144 mdt: set dmv by setxattr
authorLai Siyao <lai.siyao@whamcloud.com>
Mon, 25 Sep 2023 14:28:51 +0000 (10:28 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 27 Oct 2023 21:45:44 +0000 (21:45 +0000)
commit07732c0185c3d7be85188c260e65f581036b963a
treefd44b5e26c7cf7bfe0f1a9052e9cf24a157d6c64
parentcd1900359d8c4d74936b80805b3f6bd656811e11
LU-17144 mdt: set dmv by setxattr

Client side: convert setxattr("trusted.dmv") to "setdirstripe -D", as
will help restore directory default LMV from backup.

Server side: add a tunable to enable setxattr("trusted.dmv"), it can
be turned on by "lctl set_param -n mdt.*.enable_dmv_xattr=1". It's
off by default. Since empty buffer can be set by setxattr, add check
in server code to avoid crash.

Add sanity 413j.

Lustre-change: https://review.whamcloud.com/52510
Lustre-commit: 1ebe91ec0ab55f686a730d448e7a1ba2ce99639a

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I27d784998a9c4a182b4fffb8b06c84e9d9190919
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52511
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/xattr.c
lustre/lod/lod_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_io.c
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_reint.c
lustre/mdt/mdt_xattr.c
lustre/tests/sanity.sh