public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>
Cc: xfs <linux-xfs@vger.kernel.org>, fstests <fstests@vger.kernel.org>
Subject: [PATCHBOMB v30.10] xfsprogs-6.10: filesystem properties
Date: Tue, 6 Aug 2024 11:14:52 -0700	[thread overview]
Message-ID: <20240806181452.GE623936@frogsfrogsfrogs> (raw)

Hi all,

After recent discussions about how to allow sysadmins to opt in or out
of automatick fsck for XFS[1][2], I now have a patchset for xfsprogs
6.10 that implements the filesystem properties that we talked about.

As a refresher, the design I settled on is to add ATTR_ROOT (aka
"trusted") xattrs to the root directory.  ATTR_ROOT xattrs can only be
accessed by processes with CAP_SYS_ADMIN, so unprivileged userspace
can't mess with the sysadmin's configured preferences.

I decided that all fs properties should have "xfs:" in the name to make
them look distinct, and defined "trusted.xfs:autofsck" as the property
that controls the behavior of automatic fsck.  There's a new wrapper
program "xfs_property" that one can use to administer the properties.
xfs_scrub{,bed} uses the property; and mkfs.xfs can set it for you at
format time.

# mkfs.xfs -m autofsck /dev/sda

# xfs_property /dev/sda get autofsck
repair

# mount /dev/sda /mnt

# xfs_property /mnt set autofsck=check

# xfs_scrub -o autofsck /mnt
Info: /mnt: Checking per autofsck directive.

--D

[1] https://lore.kernel.org/linux-xfs/20240724213852.GA612460@frogsfrogsfrogs/
[2] https://lore.kernel.org/linux-xfs/20240730031030.GA6333@frogsfrogsfrogs/

             reply	other threads:[~2024-08-06 18:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 18:14 Darrick J. Wong [this message]
2024-08-06 18:18 ` [PATCHSET v30.10 1/3] xfsprogs: filesystem properties Darrick J. Wong
2024-08-06 18:19   ` [PATCH 1/7] libfrog: support editing filesystem property sets Darrick J. Wong
2024-08-06 18:19   ` [PATCH 2/7] xfs_io: edit filesystem properties Darrick J. Wong
2024-08-07 16:08     ` Christoph Hellwig
2024-08-06 18:20   ` [PATCH 3/7] xfs_db: improve getting and setting extended attributes Darrick J. Wong
2024-08-07 16:10     ` Christoph Hellwig
2024-08-07 16:43       ` Darrick J. Wong
2024-08-06 18:20   ` [PATCH 4/7] libxfs: hoist listxattr from xfs_repair Darrick J. Wong
2024-08-06 18:20   ` [PATCH 5/7] libxfs: pass a transaction context through listxattr Darrick J. Wong
2024-08-06 18:20   ` [PATCH 6/7] xfs_db: add a command to list xattrs Darrick J. Wong
2024-08-06 18:21   ` [PATCH 7/7] xfs_property: add a new tool to administer fs properties Darrick J. Wong
2024-08-07 16:10     ` Christoph Hellwig
2024-08-06 18:18 ` [PATCHSET v30.10 2/3] xfs_scrub: admin control of automatic fsck Darrick J. Wong
2024-08-06 18:21   ` [PATCH 1/4] libfrog: define a autofsck filesystem property Darrick J. Wong
2024-08-07 16:11     ` Christoph Hellwig
2024-08-06 18:21   ` [PATCH 2/4] xfs_scrub: allow sysadmin to control background scrubs Darrick J. Wong
2024-08-07 16:12     ` Christoph Hellwig
2024-08-06 18:21   ` [PATCH 3/4] xfs_scrub: use the autofsck fsproperty to select mode Darrick J. Wong
2024-08-07 16:12     ` Christoph Hellwig
2024-08-06 18:22   ` [PATCH 4/4] mkfs: set autofsck filesystem property Darrick J. Wong
2024-08-07 16:13     ` Christoph Hellwig
2024-08-06 18:19 ` [PATCHSET v30.10 3/3] debian: enable xfs_scrub_all by default Darrick J. Wong
2024-08-06 18:22   ` [PATCH 1/1] debian: enable xfs_scrub_all systemd timer services " Darrick J. Wong
2024-08-07 16:13     ` Christoph Hellwig
2024-08-06 18:19 ` [PATCHSET v30.10] fstests: xfs filesystem properties Darrick J. Wong
2024-08-06 18:22   ` [PATCH 1/1] xfs: functional testing for " Darrick J. Wong
2024-08-07 16:13     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240806181452.GE623936@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox