block: Move request_alignment into BlockLimit

It makes more sense to have ALL block size limit constraints
in the same struct.  Improve the documentation while at it.

Simplify a couple of conditionals, now that we have audited and
documented that request_alignment is always non-zero.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Eric Blake 2016-06-23 16:37:24 -06:00 committed by Kevin Wolf
parent d9e0dfa246
commit a5b8dd2ce8
12 changed files with 39 additions and 35 deletions

View file

@ -190,7 +190,7 @@ fail:
static void bochs_refresh_limits(BlockDriverState *bs, Error **errp)
{
bs->request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O supported */
bs->bl.request_alignment = BDRV_SECTOR_SIZE; /* No sub-sector I/O */
}
static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num)