[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/4] block/nbd-client: drop max_block restriction from discard
From: |
Eric Blake |
Subject: |
[PULL 4/4] block/nbd-client: drop max_block restriction from discard |
Date: |
Mon, 4 May 2020 16:14:38 -0500 |
From: Vladimir Sementsov-Ogievskiy <address@hidden>
The NBD spec was updated (see nbd.git commit 9f30fedb) so that
max_block doesn't relate to NBD_CMD_TRIM. So, drop the restriction.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[eblake: tweak commit message to call out NBD commit]
Signed-off-by: Eric Blake <address@hidden>
---
block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/nbd.c b/block/nbd.c
index d4d518a780c9..4ac23c8f6299 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -1955,7 +1955,7 @@ static void nbd_refresh_limits(BlockDriverState *bs,
Error **errp)
}
bs->bl.request_alignment = min;
- bs->bl.max_pdiscard = max;
+ bs->bl.max_pdiscard = QEMU_ALIGN_DOWN(INT_MAX, min);
bs->bl.max_pwrite_zeroes = max;
bs->bl.max_transfer = max;
--
2.26.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PULL 4/4] block/nbd-client: drop max_block restriction from discard,
Eric Blake <=