diff options
author | Eric Blake <eblake@redhat.com> | 2016-06-23 16:37:16 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-07-05 16:46:25 +0200 |
commit | 2914a1de992118286f5280eddf4f4e6060a8e00b (patch) | |
tree | 0dc803dbcb3a3b9083b68a49dfaa4b11303b75fd | |
parent | a84178ccff77d48261d31a78f1edfc58c9bdaa47 (diff) | |
download | qemu-2914a1de992118286f5280eddf4f4e6060a8e00b.zip qemu-2914a1de992118286f5280eddf4f4e6060a8e00b.tar.gz qemu-2914a1de992118286f5280eddf4f4e6060a8e00b.tar.bz2 |
raw-win32: Set request_alignment during .bdrv_refresh_limits()
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 <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/raw-win32.c | 4 |
1 files 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, |