From: "Theodore Ts'o" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-ext4@vger.kernel.org, linux-api@vger.kernel.org
Subject: Re: [PATCH 3/3] ext4: implemet new ioctls to set and get superblock parameters
Date: Thu, 11 Sep 2025 23:14:14 -0400 [thread overview]
Message-ID: <20250912031414.GD3703006@mit.edu> (raw)
In-Reply-To: <20250911224019.GE8084@frogsfrogsfrogs>
On Thu, Sep 11, 2025 at 03:40:19PM -0700, Darrick J. Wong wrote:
>
> What's the difference between _FL_FEATURES and _FL_EDIT_FEATURES?
We have three sets of
_FL_FEATURES allows the user to set the features via:
__u32 feature_compat;
__u32 feature_incompat;
__u32 feature_ro_compat;
... while _FS_EDIT_FEATURES allows the user to set or clear specific
feature or feature(s) using these fields:
__u32 set_feature_compat_mask;
__u32 set_feature_incompat_mask;
__u32 set_feature_ro_compat_mask;
__u32 clear_feature_compat_mask;
__u32 clear_feature_incompat_mask;
__u32 clear_feature_ro_compat_mask;
I originally only implemented _FS_EDIT_EFATURES but it turns out that
given how tune2fs() and e2p_edit_feateurs2() was implemented,
_FS_FEATURES was a lot more convenient. But I kept _FS_EDIT_FEATURES
in case some other users wanted an easy way to, say, "just enable
feature X" using a single ioctl.
> > +#define EXT4_TUNE_CLEAR_COMPAT_SUPP (0)
> > +#define EXT4_TUNE_CLEAR_INCOMPAT_SUPP (0)
> > +#define EXT4_TUNE_CLEAR_RO_COMPAT_SUPP \
> > + (EXT4_FEATURE_RO_COMPAT_LARGE_FILE | \
> > + EXT4_FEATURE_RO_COMPAT_DIR_NLINK | \
> > + EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE | \
> > + EXT4_FEATURE_RO_COMPAT_PROJECT)
>
> Is it actually safe to clear these without scanning the filesystem to
> make sure nobody's using these features?
Hmm.... probably not. For some of these features, tune2fs will issue
a "pleas run e2fsck -f" before mounting the file system. All of these
featrues tune2fs will allow being cleared on a mounted file system,
but looking at this more closely, I probably *shouldn't* have allowed
tune2fs to remove the feature wile the file system is mounted. (For
example, tune2fs -O ^project" will try to clear they project quota
inode even if the file system is mounted, hilarity would soon
follow...)
- Ted
prev parent reply other threads:[~2025-09-12 3:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 3:15 [PATCH 0/3] ext4: Add support for mounted updates to the superblock via an ioctl Theodore Ts'o
2025-09-09 3:15 ` Theodore Ts'o via B4 Relay
2025-09-09 3:15 ` [PATCH 1/3] ext4: avoid potential buffer over-read in parse_apply_sb_mount_options() Theodore Ts'o
2025-09-09 3:15 ` Theodore Ts'o via B4 Relay
2025-09-11 22:27 ` Darrick J. Wong
2025-09-12 2:12 ` Theodore Ts'o
2025-09-09 3:15 ` [PATCH 2/3] ext4: add support for 32-bit default reserved uid and gid values Theodore Ts'o
2025-09-09 3:15 ` Theodore Ts'o via B4 Relay
2025-09-11 22:31 ` Darrick J. Wong
2025-09-12 2:57 ` Theodore Ts'o
2025-09-09 3:15 ` [PATCH 3/3] ext4: implemet new ioctls to set and get superblock parameters Theodore Ts'o
2025-09-09 3:15 ` Theodore Ts'o via B4 Relay
2025-09-09 21:33 ` kernel test robot
2025-09-11 22:40 ` Darrick J. Wong
2025-09-12 3:14 ` Theodore Ts'o [this message]
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=20250912031414.GD3703006@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-ext4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.