diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/io.c b/block/io.c index 82c9ff0a04..323e822dd4 100644 --- a/block/io.c +++ b/block/io.c @@ -78,6 +78,9 @@ void bdrv_refresh_limits(BlockDriverState *bs, Error **errp) return; } + /* Default alignment based on whether driver has byte interface */ + bs->request_alignment = drv->bdrv_co_preadv ? 1 : 512; + /* Take some limits from the children as a default */ if (bs->file) { bdrv_refresh_limits(bs->file->bs, &local_err); |