[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251114053943.GA26898@lst.de>
Date: Fri, 14 Nov 2025 06:39:43 +0100
From: Christoph Hellwig <hch@....de>
To: Kevin Wolf <kwolf@...hat.com>
Cc: Christoph Hellwig <hch@....de>, Jan Kara <jack@...e.cz>,
Keith Busch <kbusch@...nel.org>, Dave Chinner <david@...morbit.com>,
Carlos Maiolino <cem@...nel.org>,
Christian Brauner <brauner@...nel.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-raid@...r.kernel.org,
linux-block@...r.kernel.org
Subject: Re: fall back from direct to buffered I/O when stable writes are
required
On Thu, Nov 13, 2025 at 06:39:07PM +0100, Kevin Wolf wrote:
> > A complication is that PI could relax that requirement if we support
> > PI passthrough from userspace (currently only for block device, but I
> > plan to add file system support), where the device checks it, but we
> > can't do that for parity RAID.
>
> Not sure I understand the problem here. If it's passed through from
> userspace, isn't its validity the problem of userspace, too? I'd expect
> that you only need a bounce buffer in the kernel if the kernel itself
> does something like a checksum calculation?
Yes, the PI validity is a userspace problem. But if you then also use
software RAID (right now mdraid RAID5/6 does not support PI, so that's a
theoretical case), a (potentially malicious) modification of in-flight
data could still corrupt data in another stripe. So we'd still have to
bounce buffer for user passed PI when using parity RAID below, but not
when just sending on the PI to a device (which also checks the validity
and rejects the I/O).
Powered by blists - more mailing lists