]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
block/rnbd-clt: do not cap max_hw_sectors & max_segments with remote device
authorJack Wang <jinpu.wang@cloud.ionos.com>
Tue, 13 Oct 2020 10:30:49 +0000 (12:30 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 Oct 2020 21:05:05 +0000 (15:05 -0600)
The max_hw_secotrs is only limited by the transport, not remote device,
block layer on server side will split to the device limit if it's too
big.

The max_segments, similar, and rtrs server will submit single buffer, so
no need to cap.

Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt.c

index de73a14f35806ce7f0aa13a58a9812f383dd7253..519c7d003bf05017b2b9313a28d84074f3210610 100644 (file)
@@ -91,11 +91,6 @@ static int rnbd_clt_set_dev_attr(struct rnbd_clt_dev *dev,
        dev->max_hw_sectors = sess->max_io_size / SECTOR_SIZE;
        dev->max_segments = BMAX_SEGMENTS;
 
-       dev->max_hw_sectors = min_t(u32, dev->max_hw_sectors,
-                                   le32_to_cpu(rsp->max_hw_sectors));
-       dev->max_segments = min_t(u16, dev->max_segments,
-                                 le16_to_cpu(rsp->max_segments));
-
        return 0;
 }