[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 11/17] raw-win32: Set request_alignment during .b
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v2 11/17] raw-win32: Set request_alignment during .bdrv_refresh_limits() |
Date: |
Tue, 14 Jun 2016 15:30:33 -0600 |
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>
---
v2: new patch
---
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,
--
2.5.5
- Re: [Qemu-devel] [PATCH v2 01/17] block: Tighter assertions on bdrv_aligned_pwritev(), (continued)
- [Qemu-devel] [PATCH v2 02/17] block: Document supported flags during bdrv_aligned_preadv(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 05/17] nbd: Advertise realistic limits to block layer, Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 03/17] block: Fix harmless off-by-one in bdrv_aligned_preadv(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 13/17] block: Set default request_alignment during bdrv_refresh_limits(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 11/17] raw-win32: Set request_alignment during .bdrv_refresh_limits(),
Eric Blake <=
- [Qemu-devel] [PATCH v2 07/17] block: Give nonzero result to blk_get_max_transfer_length(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 10/17] qcow2: Set request_alignment during .bdrv_refresh_limits(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 12/17] block: Set request_alignment during .bdrv_refresh_limits(), Eric Blake, 2016/06/14
- [Qemu-devel] [PATCH v2 06/17] iscsi: Advertise realistic limits to block layer, Eric Blake, 2016/06/14