From patchwork Thu Jun 11 03:28:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Durgin X-Patchwork-Id: 483140 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 55D3F140291 for ; Thu, 11 Jun 2015 23:15:02 +1000 (AEST) Received: from localhost ([::1]:46520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z327V-0005xl-6F for incoming@patchwork.ozlabs.org; Thu, 11 Jun 2015 09:02:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2tAn-00019t-7N for qemu-devel@nongnu.org; Wed, 10 Jun 2015 23:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2tAl-0002z5-Sw for qemu-devel@nongnu.org; Wed, 10 Jun 2015 23:28:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2tAf-0002ug-Cw; Wed, 10 Jun 2015 23:28:49 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5BD30347A41; Thu, 11 Jun 2015 03:28:48 +0000 (UTC) Received: from newangeles.redhat.com (dhcp-10-17-97-91.lax.redhat.com [10.17.97.91]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5B3SlaP008904 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=NO); Wed, 10 Jun 2015 23:28:48 -0400 From: Josh Durgin To: qemu-devel@nongnu.org Date: Wed, 10 Jun 2015 20:28:43 -0700 Message-Id: <1433993326-26294-2-git-send-email-jdurgin@redhat.com> In-Reply-To: <1433993326-26294-1-git-send-email-jdurgin@redhat.com> References: <1433993326-26294-1-git-send-email-jdurgin@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-Mailman-Approved-At: Thu, 11 Jun 2015 09:01:29 -0400 Cc: Kevin Wolf , Jeff Cody , qemu-block@nongnu.org Subject: [Qemu-devel] [PATCH 1/4] rbd: remove unused constants and fields X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org RBDAIOCB.status was only used for cancel, which was removed in 7691e24dbebb46658e89b3f950fda6ec78bbb823. RBDAIOCB.sector_num was never used. RADOSCB.done and rcbid were never used. RBD_FD* are obsolete since the pipe was removed in e04fb07fd1676e9facd7f3f878c1bbe03bccd26b. Signed-off-by: Josh Durgin Reviewed-by: Jeff Cody --- block/rbd.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index fbe87e0..50b5f6b 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -74,25 +74,18 @@ typedef struct RBDAIOCB { QEMUIOVector *qiov; char *bounce; RBDAIOCmd cmd; - int64_t sector_num; int error; struct BDRVRBDState *s; - int status; } RBDAIOCB; typedef struct RADOSCB { - int rcbid; RBDAIOCB *acb; struct BDRVRBDState *s; - int done; int64_t size; char *buf; int64_t ret; } RADOSCB; -#define RBD_FD_READ 0 -#define RBD_FD_WRITE 1 - typedef struct BDRVRBDState { rados_t cluster; rados_ioctx_t io_ctx; @@ -405,7 +398,6 @@ static void qemu_rbd_complete_aio(RADOSCB *rcb) } qemu_vfree(acb->bounce); acb->common.cb(acb->common.opaque, (acb->ret > 0 ? 0 : acb->ret)); - acb->status = 0; qemu_aio_unref(acb); } @@ -621,7 +613,6 @@ static BlockAIOCB *rbd_start_aio(BlockDriverState *bs, acb->error = 0; acb->s = s; acb->bh = NULL; - acb->status = -EINPROGRESS; if (cmd == RBD_AIO_WRITE) { qemu_iovec_to_buf(acb->qiov, 0, acb->bounce, qiov->size); @@ -633,7 +624,6 @@ static BlockAIOCB *rbd_start_aio(BlockDriverState *bs, size = nb_sectors * BDRV_SECTOR_SIZE; rcb = g_new(RADOSCB, 1); - rcb->done = 0; rcb->acb = acb; rcb->buf = buf; rcb->s = acb->s;