Thread (29 messages) 29 messages, 4 authors, 2020-07-28

Re: [PATCH 02/10] block: virtio-blk: check logical block size

From: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2020-07-28 15:45:16
Also in: linux-mmc, linux-scsi, lkml

On Tue, Jul 21, 2020 at 01:52:31PM +0300, Maxim Levitsky wrote:
Linux kernel only supports logical block sizes which are power of two,
at least 512 bytes and no more that PAGE_SIZE.

Check this instead of crashing later on.

Note that there is no need to check physical block size since it is
only a hint, and virtio-blk already only supports power of two values.

Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1664619

Signed-off-by: Maxim Levitsky <redacted>
---
 drivers/block/virtio_blk.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help