From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asYWH-0005xa-BJ for qemu-devel@nongnu.org; Tue, 19 Apr 2016 12:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asYWG-0001sU-Fe for qemu-devel@nongnu.org; Tue, 19 Apr 2016 12:28:57 -0400 From: Jeff Cody Date: Tue, 19 Apr 2016 12:28:46 -0400 Message-Id: <1461083327-21993-3-git-send-email-jcody@redhat.com> In-Reply-To: <1461083327-21993-1-git-send-email-jcody@redhat.com> References: <1461083327-21993-1-git-send-email-jcody@redhat.com> Subject: [Qemu-devel] [PULL 2/3] block/gluster: code movement of qemu_gluster_close() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: peter.maydell@linaro.org, jcody@redhat.com, qemu-devel@nongnu.org Move qemu_gluster_close() further up in the file, in preparation for the next patch, to avoid a forward declaration. Signed-off-by: Jeff Cody --- block/gluster.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index b0e2cc2..d9aace6 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -589,6 +589,17 @@ static coroutine_fn int qemu_gluster_co_writev(BlockDriverState *bs, return qemu_gluster_co_rw(bs, sector_num, nb_sectors, qiov, 1); } +static void qemu_gluster_close(BlockDriverState *bs) +{ + BDRVGlusterState *s = bs->opaque; + + if (s->fd) { + glfs_close(s->fd); + s->fd = NULL; + } + glfs_fini(s->glfs); +} + static coroutine_fn int qemu_gluster_co_flush_to_disk(BlockDriverState *bs) { int ret; @@ -661,17 +672,6 @@ static int64_t qemu_gluster_allocated_file_size(BlockDriverState *bs) } } -static void qemu_gluster_close(BlockDriverState *bs) -{ - BDRVGlusterState *s = bs->opaque; - - if (s->fd) { - glfs_close(s->fd); - s->fd = NULL; - } - glfs_fini(s->glfs); -} - static int qemu_gluster_has_zero_init(BlockDriverState *bs) { /* GlusterFS volume could be backed by a block device */ -- 1.9.3