qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
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	[thread overview]
Message-ID: <20150205122212.GB4666@noname.redhat.com> (raw)
In-Reply-To: <1423072297-1842-1-git-send-email-eblake@redhat.com>

Am 04.02.2015 um 18:51 hat Eric Blake geschrieben:
> From: Stefan Hajnoczi <stefanha@redhat.com>
> 
> 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 <stefanha@redhat.com>
> ---
> 
> 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

  parent reply	other threads:[~2015-02-05 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 15:31 [Qemu-devel] [PATCH] block: move I/O request processing to block/io.c Stefan Hajnoczi
2015-02-04 17:51 ` [Qemu-devel] [PATCH reformat] " Eric Blake
2015-02-04 18:01   ` Eric Blake
2015-02-04 18:15     ` Eric Blake
2015-02-05 10:17       ` Stefan Hajnoczi
2015-02-05 12:22   ` Kevin Wolf [this message]
2015-02-17 10:21     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150205122212.GB4666@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).