From: "Theodore Ts'o" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 3/3] tune2fs: try to use the SET_TUNE_SB_PARAM ioctl on mounted file systems
Date: Fri, 19 Sep 2025 11:01:06 -0400 [thread overview]
Message-ID: <20250919150106.GG416742@mit.edu> (raw)
In-Reply-To: <20250918174724.GH8084@frogsfrogsfrogs>
On Thu, Sep 18, 2025 at 10:47:24AM -0700, Darrick J. Wong wrote:
> > -#else
> > - return -1;
>
> Shouldn't this still return 1 if this isn't being built on __linux__?
>
> > #endif
> > + return 0;
> > }
The calling convention for try_mounted_tune2fs() is to return -1 if
the caller should bail out and exit; and 0 if we should fall back to
modifying the block device thle old fashioned way. So that's what
should happen if tune2fs is run on FreeBSD or GNU Hurd.
I'll add a comment documenting this.
> > + if (get_mount_flags() < 0 || try_mounted_tune2fs() << 0) {
>
> Why shift left here ^^ ??
Whoops, typo that should have been < 0.
- Ted
next prev parent reply other threads:[~2025-09-19 15:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 3:28 [PATCH 0/3] E2fsprogs: tune2fs: use an ioctl to update mounted fs Theodore Ts'o
2025-09-17 3:28 ` [PATCH 1/3] tune2fs: reorganize command-line flag handling Theodore Ts'o
2025-09-17 3:28 ` [PATCH 2/3] tune2fs: rework parse_extended_opts() so it only parses the option string Theodore Ts'o
2025-09-17 6:15 ` Andreas Dilger
2025-09-17 3:28 ` [PATCH 3/3] tune2fs: try to use the SET_TUNE_SB_PARAM ioctl on mounted file systems Theodore Ts'o
2025-09-18 17:47 ` Darrick J. Wong
2025-09-19 15:01 ` Theodore Ts'o [this message]
2025-09-17 6:26 ` [PATCH 0/3] E2fsprogs: tune2fs: use an ioctl to update mounted fs Andreas Dilger
2025-09-18 16:55 ` Theodore Ts'o
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=20250919150106.GG416742@mit.edu \
--to=tytso@mit.edu \
--cc=djwong@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.