* [PATCH] virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal
@ 2021-04-30 10:36 Sohaib Mohamed
2021-05-04 10:27 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Sohaib Mohamed @ 2021-04-30 10:36 UTC (permalink / raw)
Cc: a.fatoum, sohaib.amhmd, Michael S. Tsirkin, Jason Wang,
Paolo Bonzini, Stefan Hajnoczi, Jens Axboe,
open list:VIRTIO BLOCK AND SCSI DRIVERS, open list:BLOCK LAYER,
open list
From: Sohaib <sohaib.amhmd@gmail.com>
Prior to 72deb455b5ec ("block: remove CONFIG_LBDAF"), it was optional if
the 32-bit kernel support block device and/or file sizes larger than 2 TiB
(considering the sector size is 512 bytes)
But now sector_t and blkcnt_t are always 64-bit in size.
Suggested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sohaib Mohammed <sohaib.amhmd@gmail.com>
---
drivers/block/virtio_blk.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index b9fa3ef5b57c..18db60995100 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -447,13 +447,6 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize)
/* Host must always specify the capacity. */
virtio_cread(vdev, struct virtio_blk_config, capacity, &capacity);
- /* If capacity is too big, truncate with warning. */
- if ((sector_t)capacity != capacity) {
- dev_warn(&vdev->dev, "Capacity %llu too large: truncating\n",
- (unsigned long long)capacity);
- capacity = (sector_t)-1;
- }
-
nblocks = DIV_ROUND_UP_ULL(capacity, queue_logical_block_size(q) >> 9);
string_get_size(nblocks, queue_logical_block_size(q),
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal
2021-04-30 10:36 [PATCH] virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal Sohaib Mohamed
@ 2021-05-04 10:27 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2021-05-04 10:27 UTC (permalink / raw)
To: Sohaib Mohamed
Cc: a.fatoum, Michael S. Tsirkin, Jason Wang, Paolo Bonzini,
Jens Axboe, open list:VIRTIO BLOCK AND SCSI DRIVERS,
open list:BLOCK LAYER, open list
[-- Attachment #1: Type: text/plain, Size: 628 bytes --]
On Fri, Apr 30, 2021 at 12:36:11PM +0200, Sohaib Mohamed wrote:
> From: Sohaib <sohaib.amhmd@gmail.com>
>
> Prior to 72deb455b5ec ("block: remove CONFIG_LBDAF"), it was optional if
> the 32-bit kernel support block device and/or file sizes larger than 2 TiB
> (considering the sector size is 512 bytes)
> But now sector_t and blkcnt_t are always 64-bit in size.
>
> Suggested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Signed-off-by: Sohaib Mohammed <sohaib.amhmd@gmail.com>
> ---
> drivers/block/virtio_blk.c | 7 -------
> 1 file changed, 7 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-04 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 10:36 [PATCH] virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal Sohaib Mohamed
2021-05-04 10:27 ` Stefan Hajnoczi
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).