Received: from eggs.gnu.org ([2001:4830:134:3::10]:52880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJLRr-00040a-08 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 07:22:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJLRo-0003b7-4W for qemu-devel@nongnu.org; Thu, 05 Feb 2015 07:22:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJLRn-0003Yn-Tu for qemu-devel@nongnu.org; Thu, 05 Feb 2015 07:22:16 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15CMEOL017842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 07:22:14 -0500 Date: Thu, 5 Feb 2015 13:22:12 +0100 From: Kevin Wolf Message-ID: <20150205122212.GB4666@noname.redhat.com> References: <1423063902-4926-1-git-send-email-stefanha@redhat.com> <1423072297-1842-1-git-send-email-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423072297-1842-1-git-send-email-eblake@redhat.com> Subject: Re: [Qemu-devel] [PATCH reformat] block: move I/O request processing to block/io.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, stefanha@redhat.com Am 04.02.2015 um 18:51 hat Eric Blake geschrieben: > From: Stefan Hajnoczi > > 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 > --- > > 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