From: Christoph Hellwig <hch@infradead.org>
To: Zorro Lang <zlang@kernel.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>, Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2 2/6] fstests: consolidate _require_fs_sysfs and _require_fs_sysfs_dev_attr
Date: Wed, 28 Oct 2026 08:57:26 -0700 [thread overview]
Message-ID: <auIbZuqnQBrNdqDF@infradead.org> (raw)
In-Reply-To: <20261023203114.1655019-3-zlang@kernel.org>
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?
> + _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.
>
> # 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-10-28 15:57 UTC|newest]
Thread overview: 13+ 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 [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=auIbZuqnQBrNdqDF@infradead.org \
--to=hch@infradead.org \
--cc=asj@kernel.org \
--cc=chao@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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.