Skip to contentSkip to conversation

virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal

PATCH In review Sohaib Mohamed 2 participants 2 messages Apr 30, 2021 – May 4, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal

From: Sohaib <[email protected]>

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.

---
 drivers/block/virtio_blk.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/block/virtio_blk.c +0 -7
index b9fa3ef5b57c..18db60995100 100644
@@ -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),
Signature · 1 line
2.25.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Sohaib Mohamed

From: Sohaib <[email protected]>

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.

Quoted 5 lines
---
 drivers/block/virtio_blk.c | 7 -------
 1 file changed, 7 deletions(-)

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization