From: Zorro Lang <zlang@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: fstests@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-btrfs@vger.kernel.org, Anand Suveer Jain <asj@kernel.org>,
Chao Yu <chao@kernel.org>
Subject: Re: [PATCH v2 2/6] fstests: consolidate _require_fs_sysfs and _require_fs_sysfs_dev_attr
Date: Mon, 2 Nov 2026 22:55:00 +0800 [thread overview]
Message-ID: <auij080MipLBdTfy@zlang-mailbox> (raw)
In-Reply-To: <auIbZuqnQBrNdqDF@infradead.org>
On Wed, Oct 28, 2026 at 08:57:26AM -0700, Christoph Hellwig wrote:
> On Sat, Oct 24, 2026 at 04:31:10AM +0800, Zorro Lang wrote:
> > There is heavy overlap between _require_fs_sysfs and
> > _require_fs_sysfs_dev_attr, and their ambiguous names make it
> > difficult to tell them apart.
> >
> > Teach _require_fs_sysfs_dev_attr to default to $TEST_DEV when only
> > an attribute is given, remove _has_fs_sysfs and _require_fs_sysfs,
> > and update their callers.
>
> I find the optional device argument a bit confusing. What speaks against
> making it mandatory and having _require_{test,scratch}_sysfs_dev_attr
> wrappers?
Thanks for reviewing! Sure, that makes more sense.
>
> > + _has_fs_sysfs_dev_attr $dev "$ctlfile" && _set_fs_sysfs_dev_attr $dev "$ctlfile" 1
>
> Please turn this into an if to make it more readable and avoid the
> long line.
Sure, I'll send v3 with this patch updated.
Thanks,
Zorro
>
> >
> > # Disable retry of metadata writes that fail with EIO
> > for ctl in max_retries retry_timeout_seconds; do
> > ctlfile="error/metadata/EIO/$ctl"
> >
> > - _has_fs_sysfs "$ctlfile" && _set_fs_sysfs_dev_attr $dev "$ctlfile" 0
> > + _has_fs_sysfs_dev_attr $dev "$ctlfile" && _set_fs_sysfs_dev_attr $dev "$ctlfile" 0
>
> Same.
>
next prev parent reply other threads:[~2026-11-02 14:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 20:31 [PATCH v2 0/6] Refactor *_fs_sysfs_* helpers Zorro Lang
2026-10-23 20:31 ` [PATCH v2 1/6] fstests: rename _*_fs_sysfs_attr helpers to _*_fs_sysfs_dev_attr Zorro Lang
2026-10-28 15:55 ` Christoph Hellwig
2026-10-23 20:31 ` [PATCH v2 2/6] fstests: consolidate _require_fs_sysfs and _require_fs_sysfs_dev_attr Zorro Lang
2026-10-28 15:57 ` Christoph Hellwig
2026-11-02 14:55 ` Zorro Lang [this message]
2026-10-23 20:31 ` [PATCH v2 3/6] common: move btrfs-only sysfs policy helpers out of common/sysfs Zorro Lang
2026-10-28 15:57 ` Christoph Hellwig
2026-10-23 20:31 ` [PATCH v2 4/6] common/rc: add helpers for /sys/fs/$FSTYP/features/ Zorro Lang
2026-10-28 15:58 ` Christoph Hellwig
2026-10-23 20:31 ` [PATCH v2 5/6] common/rc: use common helper in _require_fanotify_ioerrors for f2fs Zorro Lang
2026-10-28 15:58 ` Christoph Hellwig
2026-10-23 20:31 ` [PATCH v2 6/6] fstests: replace btrfs specific helpers with common sysfs helpers Zorro Lang
2026-10-28 15:58 ` 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=auij080MipLBdTfy@zlang-mailbox \
--to=zlang@kernel.org \
--cc=asj@kernel.org \
--cc=chao@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.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