[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] block/nbd: define new max_write_zero_fast limit
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v2 4/6] block/nbd: define new max_write_zero_fast limit |
Date: |
Wed, 1 Apr 2020 18:01:10 +0300 |
The NBD spec was recently updated to clarify that max_block doesn't
relate to NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which
mirrors Qemu flag BDRV_REQ_NO_FALLBACK).
bs->bl.max_write_zero_fast is zero by default which means using
max_pwrite_zeroes. Update nbd driver to allow larger requests with
BDRV_REQ_NO_FALLBACK.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
block/nbd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/nbd.c b/block/nbd.c
index 4ac23c8f62..b0584cf68d 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -1956,6 +1956,7 @@ static void nbd_refresh_limits(BlockDriverState *bs,
Error **errp)
bs->bl.request_alignment = min;
bs->bl.max_pdiscard = QEMU_ALIGN_DOWN(INT_MAX, min);
+ bs->bl.max_pwrite_zeroes_fast = bs->bl.max_pdiscard;
bs->bl.max_pwrite_zeroes = max;
bs->bl.max_transfer = max;
--
2.21.0
- [PATCH v2 0/6] nbd: reduce max_block restrictions, Vladimir Sementsov-Ogievskiy, 2020/04/01
- [PATCH v2 5/6] block/io: refactor bdrv_co_do_pwrite_zeroes head calculation, Vladimir Sementsov-Ogievskiy, 2020/04/01
- [PATCH v2 4/6] block/nbd: define new max_write_zero_fast limit,
Vladimir Sementsov-Ogievskiy <=
- [PATCH v2 1/6] block/nbd-client: drop max_block restriction from block_status, Vladimir Sementsov-Ogievskiy, 2020/04/01
- [PATCH v2 2/6] block/nbd-client: drop max_block restriction from discard, Vladimir Sementsov-Ogievskiy, 2020/04/01
- [PATCH v2 3/6] block: add max_pwrite_zeroes_fast to BlockLimits, Vladimir Sementsov-Ogievskiy, 2020/04/01
- [PATCH v2 6/6] block/io: auto-no-fallback for write-zeroes, Vladimir Sementsov-Ogievskiy, 2020/04/01
- Re: [PATCH v2 0/6] nbd: reduce max_block restrictions, no-reply, 2020/04/01