[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_b
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes |
Date: |
Tue, 4 Jul 2017 17:32:52 +0800 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Mon, 07/03 17:14, Eric Blake wrote:
> We are gradually moving away from sector-based interfaces, towards
> byte-based. In the common case, allocation is unlikely to ever use
> values that are not naturally sector-aligned, but it is possible
> that byte-based values will let us be more precise about allocation
> at the end of an unaligned file that can do byte-based access.
>
> Changing the name of the function from bdrv_get_block_status_above()
> to bdrv_block_status_above() ensures that the compiler enforces that
> all callers are updated. For now, the io.c layer still assert()s
> that all callers are sector-aligned, but that can be relaxed when a
> later patch implements byte-based block status in the drivers.
>
> For the most part this patch is just the addition of scaling at the
> callers followed by inverse scaling at bdrv_block_status(). But some
> code, particularly bdrv_block_status(), gets a lot simpler because
> it no longer has to mess with sectors.
>
> For ease of review, bdrv_get_block_status() was tackled separately.
>
> Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 08/15] block: Convert bdrv_get_block_status() to bytes, (continued)
- [Qemu-block] [PATCH v2 09/15] block: Switch bdrv_co_get_block_status() to byte-based, Eric Blake, 2017/07/03
- [Qemu-block] [PATCH v2 12/15] block: Switch bdrv_co_get_block_status_above() to byte-based, Eric Blake, 2017/07/03
- [Qemu-block] [PATCH v2 10/15] block: Switch BdrvCoGetBlockStatusData to byte-based, Eric Blake, 2017/07/03
- [Qemu-block] [PATCH v2 11/15] block: Switch bdrv_common_block_status_above() to byte-based, Eric Blake, 2017/07/03
- [Qemu-block] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes, Eric Blake, 2017/07/03
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes,
Fam Zheng <=
- [Qemu-block] [PATCH v2 14/15] block: Align block status requests, Eric Blake, 2017/07/03
- [Qemu-block] [PATCH v2 15/15] qemu-io: Relax 'alloc' now that block-status doesn't assert, Eric Blake, 2017/07/03
- [Qemu-block] [RFC PATCH v2 16/15] block: Add .bdrv_co_block_status() callback, Eric Blake, 2017/07/03