Re: [PATCH 20/22] xfs: add support for lazy direct read bounce buffering
Christoph Hellwig <[email protected]> Tue, 28 Jul 2026 06:58:44 +0200
| Newsgroups | org.kernel.vger.linux-xfs,org.kernel.vger.linux-block,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jul 27, 2026 at 07:44:32PM +0530, Anuj Gupta/Anuj Gupta wrote:
> On 7/23/2026 8:19 PM, Christoph Hellwig wrote:
> > +static ssize_t
> > +read_bounce_store(
> > + struct kobject *kobj,
> > + const char *buf,
> > + size_t count)
> > +{
> > + struct xfs_mount *mp = csum_to_mp(kobj);
> > +
> > + if (!strcmp(buf, "never"))
> > + WRITE_ONCE(mp->m_read_bounce, XFS_READ_BOUNCE_NEVER);
> > + else if (!strcmp(buf, "always"))
> > + WRITE_ONCE(mp->m_read_bounce, XFS_READ_BOUNCE_ALWAYS);
> > + else if (!strcmp(buf, "lazy"))
> > + WRITE_ONCE(mp->m_read_bounce, XFS_READ_BOUNCE_LAZY);
> it returns a -EINVAL always.
>
> # echo always > /sys/fs/xfs/nvme0n1/csum/read_bounce
> bash: echo: write error: Invalid argument
Use echo -n.
>
> Maybe use sysfs_streq here?
I've already switched this to table matching in the current version.