aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorSohaib <[email protected]>2021-04-30 12:36:11 +0200
committerMichael S. Tsirkin <[email protected]>2021-07-03 04:50:49 -0400
commit4f118472d4b40142004bc6bc652a651f67bfee94 (patch)
tree7ad4849ce7f6846ceb70d242e2db02eed7f45403 /drivers/block
parent3dbdb38e286903ec220aaf1fb29a8d94297da246 (diff)
virtio_blk: cleanups: remove check obsoleted by CONFIG_LBDAF removal
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 <[email protected]> Signed-off-by: Sohaib Mohammed <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index e4bd3b1fc3c2..6dda64fec743 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),