[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c |
Date: |
Thu, 5 Feb 2015 13:22:12 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 04.02.2015 um 18:51 hat Eric Blake geschrieben:
> From: Stefan Hajnoczi <address@hidden>
>
> The block.c file has grown to over 6000 lines. It is time to split this
> file so there are fewer conflicts and the code is easier to maintain.
>
> Extract I/O request processing code:
> * Read
> * Write
> * Flush
> * Discard
> * ioctl
> * Tracked requests and queuing
> * Throttling and copy-on-read
>
> The patch simply moves code from block.c into block/io.c.
>
> No code changes are made except adding the following block_int.h
> functions so they can be called across block.c and block/io.c:
> bdrv_drain_one(), bdrv_set_dirty(), bdrv_reset_dirty().
>
> I/O request processing needs to set up BlockDriver coroutine and AIO
> emulation function pointers, so add bdrv_setup_io_funcs(bdrv) interface
> that block.c calls.
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>
> This patch produces identical results to Stefan's email, but is
> MUCH more readable (hint: git config diff.algorithm patience)
Any thoughts on moving (some of) the following functions in addition?
* bdrv_drain_all()
* bdrv_make_zero()
* bdrv_flush_all()
* bdrv_is_allocated/get_block_status family of functions
* Anything with respect to BlockLimits
* load/save_vmstate()
* qemu_blockalign() and friends
These are more or less all of the block.c functions that are clearly not
operations on the graph, but more or less directly related to some kind
of I/O. If we move out the graph management code, these would be left in
block.c, which is probably not what we want.
Kevin