diff options
Diffstat (limited to 'block/dmg.c')
-rw-r--r-- | block/dmg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/dmg.c b/block/dmg.c index 06eb5138f3..1e53cd8c0b 100644 --- a/block/dmg.c +++ b/block/dmg.c @@ -439,7 +439,6 @@ static int dmg_open(BlockDriverState *bs, QDict *options, int flags, int ret; bs->read_only = 1; - bs->request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O supported */ s->n_chunks = 0; s->offsets = s->lengths = s->sectors = s->sectorcounts = NULL; @@ -547,6 +546,11 @@ fail: return ret; } +static void dmg_refresh_limits(BlockDriverState *bs, Error **errp) +{ + bs->request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O supported */ +} + static inline int is_sector_in_chunk(BDRVDMGState* s, uint32_t chunk_num, uint64_t sector_num) { @@ -720,6 +724,7 @@ static BlockDriver bdrv_dmg = { .instance_size = sizeof(BDRVDMGState), .bdrv_probe = dmg_probe, .bdrv_open = dmg_open, + .bdrv_refresh_limits = dmg_refresh_limits, .bdrv_co_preadv = dmg_co_preadv, .bdrv_close = dmg_close, }; |