From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Andreas Dilger <adilger@dilger.ca>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] mke2fs.c: fail on multiple '-E' options
Date: Wed, 10 Sep 2025 12:29:21 -0400 [thread overview]
Message-ID: <CANp-EDZ-5_UC+p77d+ZPMMtbH3eXAPvoL4tR_EL3dcpBk-wKeQ@mail.gmail.com> (raw)
In-Reply-To: <20250910145241.GA3662537@mit.edu>
Hi Ted,
On Wed, Sep 10, 2025 at 10:52 AM Theodore Ts'o <tytso@mit.edu> wrote:
> What I would suggest that you do is to move code which mutates the
> file system from parse_extended_opts() so it is only interpreting the
> options, and move that code to tuine2fs_main().
Yes, I see where you are going. Being able to deny read/write to a
block device that is mounted is a good goal.
But I am talking about mke2fs rather than tune2fs. I can't really see
a need for two code paths when creating a filesystem?
It would still make sense to separate the option parsing from the
mutation logic of course.
> That way we can call parse_extended_opts() multiple times.
Note this is already occurs in mke2fs: one call to process options
from profile/config file, and another call for command-line args.
So in v2 patch, I just made further calls, one for each -E argument.
So far it seems to work without problems.
Regards
-Ralph
next prev parent reply other threads:[~2025-09-10 16:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 15:40 [PATCH RFC 0/3] mke2fs: small doc and features Ralph Siemsen
2025-09-09 15:40 ` [PATCH RFC 1/3] mke2fs: document the hash_seed option Ralph Siemsen
2025-09-09 15:40 ` [PATCH RFC 2/3] mke2fs.c: fail on multiple '-E' options Ralph Siemsen
2025-09-10 0:32 ` Andreas Dilger
2025-09-10 0:49 ` Ralph Siemsen
2025-09-10 14:52 ` Theodore Ts'o
2025-09-10 15:00 ` Theodore Ts'o
2025-09-10 16:29 ` Ralph Siemsen [this message]
2025-09-10 20:45 ` Theodore Ts'o
2025-09-10 21:31 ` Ralph Siemsen
2025-09-19 15:44 ` Ralph Siemsen
2025-09-09 15:40 ` [PATCH RFC 3/3] mke2fs: add root_selinux option for root inode label Ralph Siemsen
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=CANp-EDZ-5_UC+p77d+ZPMMtbH3eXAPvoL4tR_EL3dcpBk-wKeQ@mail.gmail.com \
--to=ralph.siemsen@linaro.org \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).