[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block: use the request length for iov alignment
From: |
Keith Busch |
Subject: |
Re: [PATCH] block: use the request length for iov alignment |
Date: |
Thu, 15 Sep 2022 08:12:43 +0100 |
On Wed, Sep 14, 2022 at 11:36:14AM +0100, Kevin Wolf wrote:
> Am 13.09.2022 um 15:12 hat Keith Busch geschrieben:
> > On Thu, Sep 08, 2022 at 09:45:26AM -0700, Keith Busch wrote:
> > > From: Keith Busch <kbusch@kernel.org>
> > >
> > > An iov length needs to be aligned to the logical block size, which may
> > > be larger than the memory alignment.
> >
> > [cc'ing some other interested folks]
> >
> > Any thoughts on this patch? It is fixing an observed IO error when running
> > virtio-blk with the default 512b logical block size backed by a drive
> > formatted
> > with 4k logical block.
>
> I need to take a real look after KVM Forum, but my first thought was
> that we might be overloading request_alignment with multiple meanings
> now (file offset alignment and memory address alignment), and the values
> just happen to be the same for files on Linux.
>
> Did you consider a separate iov_alignment or similar and intentionally
> decided against it, or is it something you just didn't think about?
I thought the request_alignment was indicating the minimum block length, so I
did not consider an additional separate value. If it can be overloaded, then
yes, I can certainly take on that idea.