Hi all, It would be very useful if system administrators could set properties for a given xfs filesystem to control its behavior. This we can do easily and extensibly by setting ATTR_ROOT (aka "trusted") extended attributes on the root directory. To prevent this from becoming a weird free for all, let's add some library and tooling support so that sysadmins simply run the xfs_property program to administer these properties. If you're going to start using this code, I strongly recommend pulling from my git trees, which are linked below. This has been running on the djcloud for months with no problems. Enjoy! Comments and questions are, as always, welcome. --D xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=filesystem-properties fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=filesystem-properties --- Commits in this patchset: * libfrog: support editing filesystem property sets * xfs_spaceman: edit filesystem properties * xfs_db: improve getting and setting extended attributes * libxfs: hoist listxattr from xfs_repair * libxfs: pass a transaction context through listxattr * xfs_db: add a command to list xattrs * xfs_property: add a new tool to administer fs properties --- db/attrset.c | 463 ++++++++++++++++++++++++++++++++++++++++++++++- libfrog/Makefile | 7 + libfrog/fsproperties.c | 39 ++++ libfrog/fsproperties.h | 50 +++++ libfrog/fsprops.c | 214 ++++++++++++++++++++++ libfrog/fsprops.h | 34 +++ libxfs/Makefile | 2 libxfs/listxattr.c | 42 ++-- libxfs/listxattr.h | 17 ++ man/man8/xfs_db.8 | 68 +++++++ man/man8/xfs_property.8 | 52 +++++ man/man8/xfs_spaceman.8 | 27 +++ repair/Makefile | 2 repair/listxattr.h | 15 -- repair/pptr.c | 9 + spaceman/Makefile | 7 + spaceman/init.c | 1 spaceman/properties.c | 342 +++++++++++++++++++++++++++++++++++ spaceman/space.h | 1 spaceman/xfs_property | 77 ++++++++ 20 files changed, 1422 insertions(+), 47 deletions(-) create mode 100644 libfrog/fsproperties.c create mode 100644 libfrog/fsproperties.h create mode 100644 libfrog/fsprops.c create mode 100644 libfrog/fsprops.h rename repair/listxattr.c => libxfs/listxattr.c (84%) create mode 100644 libxfs/listxattr.h create mode 100644 man/man8/xfs_property.8 delete mode 100644 repair/listxattr.h create mode 100644 spaceman/properties.c create mode 100755 spaceman/xfs_property