[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq1k0dd4pde.fsf@ca-mkp.ca.oracle.com>
Date: Tue, 01 Mar 2022 11:30:23 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Akihiko Odaki <akihiko.odaki@...il.com>
Cc: Stefan Hajnoczi <stefanha@...hat.com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
Jens Axboe <axboe@...nel.dk>,
Paolo Bonzini <pbonzini@...hat.com>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] virtio-blk: Assign discard_granularity
Akihiko,
> I'd like to leave this patch as is since I cannot deny the possibility
> that the host has a different alignment offset for discarding and
> other operations.
That's correct.
SCSI explicitly reports separate values for physical block alignment and
"discard" alignment. The queue limits reflect this distinction.
While it is not super common for these two to be different, it does
happen. There are several disk arrays that do not have an internal
allocation unit (discard granularity) which is a power of two, for
instance.
I am not particularly happy that we have to deal with two distinct types
of alignment in the stack but that is the reality of the hardware we
have to support.
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists