From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Akihiko Odaki <akihiko.odaki@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-block@vger.kernel.org,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] virtio-blk: Assign discard_granularity
Date: Tue, 01 Mar 2022 11:30:23 -0500 [thread overview]
Message-ID: <yq1k0dd4pde.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <e306700c-3153-9422-974c-1f5f10e232d6@gmail.com> (Akihiko Odaki's message of "Tue, 1 Mar 2022 14:43:55 +0900")
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
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
prev parent reply other threads:[~2022-03-01 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220224093802.11348-1-akihiko.odaki@gmail.com>
2022-02-28 10:51 ` [PATCH] virtio-blk: Assign discard_granularity Stefan Hajnoczi
[not found] ` <e306700c-3153-9422-974c-1f5f10e232d6@gmail.com>
2022-03-01 9:06 ` Stefan Hajnoczi
2022-03-01 16:30 ` Martin K. Petersen [this message]
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=yq1k0dd4pde.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=akihiko.odaki@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).