From: Zorro Lang <zlang@kernel.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Prabhakar Pujeri <prabhakar.pujeri@dell.com>, fstests@vger.kernel.org
Subject: Re: [PATCH v2] overlay/081: add missing _require_scratch check
Date: Wed, 2 Sep 2026 22:13:56 +0800 [thread overview]
Message-ID: <apgtCCVNFzb9giBh@zlang-mailbox> (raw)
In-Reply-To: <CAOQ4uxjBc5CfCpjrq8Ut4xHHaenKicTxBCbNuQkBFuu-Mz9=EQ@mail.gmail.com>
On Wed, Sep 02, 2026 at 10:25:57AM +0200, Amir Goldstein wrote:
> On Wed, Sep 2, 2026 at 9:35 AM Prabhakar Pujeri
> <prabhakar.pujeri@dell.com> wrote:
> >
> > On Wed, Sep 02, 2026 at 01:51:08PM +0800, Zorro Lang wrote:
> > > As you're fixing this patch, I'm wondering if we need a _require_* helper to
> > > make sure the mount options *uuid=null/auto/on* is supported by current system?
> > > Due to the comment says "mount options uuid=null/auto/on introduced in kernel
> > > v6.6" :)
> >
> > Thanks for looking. That case is already covered a few lines below the
> > change, at the first use of the uuid= option (line 40):
> >
> > _overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o uuid=null \
> > 2>/dev/null || \
> > _notrun "Overlayfs does not support unique fsid feature"
> >
> > overlayfs rejects unknown mount options with EINVAL, so on kernels older
> > than v6.6 that probe mount fails and the test skips with the _notrun
> > reason instead of failing. The uuid= options are also exercised only by
> > this test (it is the sole user of uuid=null/on/auto in the tree), so a
> > dedicated _require_* helper would have exactly one call site. Happy to
> > factor it out anyway if you would rather have an explicit requirement.
> >
>
> *IF* we would want this, I would not recommend a dedicated require_
> for uuid feature.
>
> I would recommend teaching _require_scratch_overlay_features/
> _check_overlay_feature to deal with mount options (e.g. uuid=on)
> which do not have a module parameter to tune the default.
>
> So if /sys/module/overlay/parameters/uuid does not exist, instead of
> assuming it is not supported, assume that it defaults to off.
>
> I am not saying this is worth the trouble, which is probably why I took the
> easy lane and added the local _notrun condition adhoc in the test.
>
> Overlayfs enum mount options that can be tested with the generic
> features helper: redirect_dir, index, nfs_export, metacopy
>
> Overlayfs enum mount options that cannot be tested with the
> generic features helper because they do not have a corresponding
> module param of same name:
> uuid, xino, verity, fsync
>
> verity - has a dedicated helper because it has special conditions.
> fsync - test 087 has _require_scratch_shutdown_and_syncfs
> which is technically enough to test support for -o volatile
> uuid - can benefit from generalization of features helper
> xino - all these tests 041, 043, 044, 067, 070, 071 practically open
> code the suggested improvement of the generic helper
>
> So for the uuid test alone it might not be worth it, but unless I am mistaken
> for all the xino tests, this would be a nice cleanup/improvement.
>
> But of course, this should not block this trivial and correct fix patch.
Thanks Amir! Sure, I've already applied this patch locally. I just wanted
to use this opportunity to bring it up for discussion, as overlayfs is quite
a unique filesystem and its features have indeed been growing steadily.
I completely agree that having a unified feature check/require helper makes
sense. It would definitely make writing future test cases much cleaner and
simpler. Any patches in this direction are definitely more than welcome :)
Thanks,
Zorro
>
> Thanks,
> Amir.
prev parent reply other threads:[~2026-09-02 14:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 13:24 [PATCH v2] overlay/081: add missing _require_scratch check Prabhakar Pujeri
2026-09-02 5:51 ` Zorro Lang
2026-09-02 7:35 ` Prabhakar Pujeri
2026-09-02 8:25 ` Amir Goldstein
2026-09-02 14:13 ` Zorro Lang [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=apgtCCVNFzb9giBh@zlang-mailbox \
--to=zlang@kernel.org \
--cc=amir73il@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=prabhakar.pujeri@dell.com \
/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