[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignm
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignment |
Date: |
Mon, 9 Dec 2013 13:58:06 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 06.12.2013 um 18:53 hat Paolo Bonzini geschrieben:
> Il 06/12/2013 18:22, Kevin Wolf ha scritto:
> > @@ -1227,6 +1288,7 @@ static BlockDriver bdrv_file = {
> > .bdrv_aio_writev = raw_aio_writev,
> > .bdrv_aio_flush = raw_aio_flush,
> > .bdrv_aio_discard = raw_aio_discard,
> > + .bdrv_opt_mem_align = raw_opt_mem_align,
> >
> > .bdrv_truncate = raw_truncate,
> > .bdrv_getlength = raw_getlength,
> > @@ -1582,6 +1644,7 @@ static BlockDriver bdrv_host_device = {
> > .bdrv_aio_writev = raw_aio_writev,
> > .bdrv_aio_flush = raw_aio_flush,
> > .bdrv_aio_discard = hdev_aio_discard,
> > + .bdrv_opt_mem_align = raw_opt_mem_align,
>
> Should this rather be a BlockLimits field?
How is BlockLimits supposed with respect to inheritance of values
through the BDS tree? I tried looking at the code, but for example
bl.opt_transfer_length is only forwarded in raw, so for any other format
(or if you ever put a filter there) it simply doesn't work.
I could initialise a new BlockLimits.opt_mem_align field in
bdrv_open_common() with the value of bs->file->bl.opt_mem_align, and in
bdrv_open_backing_file() change it to MAX(bs->bl.opt_mem_align,
bs->backing_hd->bl.opt_mem_align). The block driver could then in
bdrv_open() override the former, but never the latter.
What would happen on bdrv_reopen(), specifically toggling O_DIRECT? The
values would have to change then.
Kevin
- [Qemu-devel] [RFC PATCH 00/19] block: Support for 512b-on-4k emulation, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 01/19] qemu_memalign: Allow small alignments, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 02/19] block: Detect unaligned length in bdrv_qiov_is_aligned(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 03/19] block: Don't use guest sector size for qemu_blockalign(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 04/19] block: rename buffer_alignment to guest_block_size, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 05/19] raw: Probe required direct I/O alignment, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 06/19] block: Introduce bdrv_aligned_preadv(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 07/19] block: Introduce bdrv_co_do_preadv(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 08/19] block: Introduce bdrv_aligned_pwritev(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 09/19] block: write: Handle COR dependency after I/O throttling, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 10/19] block: Introduce bdrv_co_do_pwritev(), Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 11/19] block: Switch BdrvTrackedRequest to byte granularity, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 12/19] block: Allow waiting for overlapping requests between begin/end, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 13/19] block: Make zero-after-EOF work with larger alignment, Kevin Wolf, 2013/12/06
- [Qemu-devel] [RFC PATCH 14/19] block: Generalise and optimise COR serialisation, Kevin Wolf, 2013/12/06