[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/43] raw-win32: Set request_alignment during .bdrv_
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 13/43] raw-win32: Set request_alignment during .bdrv_refresh_limits() |
Date: |
Tue, 5 Jul 2016 17:50:22 +0200 |
From: Eric Blake <address@hidden>
We want to eventually stick request_alignment alongside other
BlockLimits, but first, we must ensure it is populated at the
same time as all other limits, rather than being a special case
that is set only when a block is first opened.
In this case, raw_probe_alignment() already did what we needed,
so just fix its signature and wire it in correctly.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-win32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/raw-win32.c b/block/raw-win32.c
index fd23891..88382d9 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -222,7 +222,7 @@ static void raw_attach_aio_context(BlockDriverState *bs,
}
}
-static void raw_probe_alignment(BlockDriverState *bs)
+static void raw_probe_alignment(BlockDriverState *bs, Error **errp)
{
BDRVRawState *s = bs->opaque;
DWORD sectorsPerCluster, freeClusters, totalClusters, count;
@@ -365,7 +365,6 @@ static int raw_open(BlockDriverState *bs, QDict *options,
int flags,
win32_aio_attach_aio_context(s->aio, bdrv_get_aio_context(bs));
}
- raw_probe_alignment(bs);
ret = 0;
fail:
qemu_opts_del(opts);
@@ -550,6 +549,7 @@ BlockDriver bdrv_file = {
.bdrv_needs_filename = true,
.bdrv_parse_filename = raw_parse_filename,
.bdrv_file_open = raw_open,
+ .bdrv_refresh_limits = raw_probe_alignment,
.bdrv_close = raw_close,
.bdrv_create = raw_create,
.bdrv_has_zero_init = bdrv_has_zero_init_1,
--
1.8.3.1
- [Qemu-devel] [PULL 06/43] nbd: Advertise realistic limits to block layer, (continued)
- [Qemu-devel] [PULL 06/43] nbd: Advertise realistic limits to block layer, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 10/43] blkdebug: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 07/43] iscsi: Advertise realistic limits to block layer, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 11/43] iscsi: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 09/43] block: Give nonzero result to blk_get_max_transfer_length(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 12/43] qcow2: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 15/43] block: Set default request_alignment during bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 17/43] block: Wording tweaks to write zeroes limits, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 14/43] block: Set request_alignment during .bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 16/43] block: Switch transfer length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 13/43] raw-win32: Set request_alignment during .bdrv_refresh_limits(),
Kevin Wolf <=
- [Qemu-devel] [PULL 18/43] block: Switch discard length bounds to byte-based, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 19/43] block: Drop raw_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 20/43] block: Split bdrv_merge_limits() from bdrv_refresh_limits(), Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 24/43] block: fix return code for partial write for Linux AIO, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 22/43] block: Fix error message style, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 27/43] blkreplay: Convert to byte-based I/O, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 21/43] block: Move request_alignment into BlockLimit, Kevin Wolf, 2016/07/05
- [Qemu-devel] [PULL 23/43] block: Use bool as appropriate for BDS members, Kevin Wolf, 2016/07/05