From patchwork Mon Aug 30 15:59:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 63106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2F84FB70EF for ; Tue, 31 Aug 2010 03:36:18 +1000 (EST) Received: from localhost ([127.0.0.1]:35113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq8Br-0003Rn-Ot for incoming@patchwork.ozlabs.org; Mon, 30 Aug 2010 13:30:39 -0400 Received: from [140.186.70.92] (port=36824 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq6lm-0004yo-Oc for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq6ll-0007b1-HV for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3149) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq6ll-0007av-B9 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 11:59:37 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFxZNw031738 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 30 Aug 2010 11:59:35 -0400 Received: from localhost6.localdomain6 ([10.3.121.6]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7UFxMbo029916; Mon, 30 Aug 2010 11:59:34 -0400 From: Jes.Sorensen@redhat.com To: qemu-devel@nongnu.org Date: Mon, 30 Aug 2010 17:59:15 +0200 Message-Id: <1283183960-28404-10-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> References: <1283183960-28404-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com Subject: [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jes Sorensen Signed-off-by: Jes Sorensen --- block/sheepdog.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 81aa564..2ef8655 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -394,7 +394,7 @@ static inline AIOReq *alloc_aio_req(BDRVSheepdogState *s, SheepdogAIOCB *acb, return aio_req; } -static inline int free_aio_req(BDRVSheepdogState *s, AIOReq *aio_req) +static inline int free_aio_req(AIOReq *aio_req) { SheepdogAIOCB *acb = aio_req->aiocb; QLIST_REMOVE(aio_req, outstanding_aio_siblings); @@ -755,7 +755,7 @@ out: } static int add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req, - struct iovec *iov, int niov, int create, + struct iovec *iov, int create, enum AIOCBState aiocb_type); /* @@ -779,10 +779,10 @@ static void send_pending_req(BDRVSheepdogState *s, uint64_t oid, uint32_t id) acb = aio_req->aiocb; ret = add_aio_request(s, aio_req, acb->qiov->iov, - acb->qiov->niov, 0, acb->aiocb_type); + 0, acb->aiocb_type); if (ret < 0) { error_report("add_aio_request is failed\n"); - free_aio_req(s, aio_req); + free_aio_req(aio_req); if (QLIST_EMPTY(&acb->aioreq_head)) { sd_finish_aiocb(acb); } @@ -872,7 +872,7 @@ static void aio_read_response(void *opaque) error_report("%s\n", sd_strerror(rsp.result)); } - rest = free_aio_req(s, aio_req); + rest = free_aio_req(aio_req); if (!rest) { /* * We've finished all requests which belong to the AIOCB, so @@ -1064,7 +1064,7 @@ out: } static int add_aio_request(BDRVSheepdogState *s, AIOReq *aio_req, - struct iovec *iov, int niov, int create, + struct iovec *iov, int create, enum AIOCBState aiocb_type) { int nr_copies = s->inode.nr_copies; @@ -1460,9 +1460,9 @@ static void sd_write_done(SheepdogAIOCB *acb) iov.iov_len = sizeof(s->inode); aio_req = alloc_aio_req(s, acb, vid_to_vdi_oid(s->inode.vdi_id), data_len, offset, 0, 0, offset); - ret = add_aio_request(s, aio_req, &iov, 1, 0, AIOCB_WRITE_UDATA); + ret = add_aio_request(s, aio_req, &iov, 0, AIOCB_WRITE_UDATA); if (ret) { - free_aio_req(s, aio_req); + free_aio_req(aio_req); acb->ret = -EIO; goto out; } @@ -1613,11 +1613,11 @@ static void sd_readv_writev_bh_cb(void *p) } } - ret = add_aio_request(s, aio_req, acb->qiov->iov, acb->qiov->niov, + ret = add_aio_request(s, aio_req, acb->qiov->iov, create, acb->aiocb_type); if (ret < 0) { error_report("add_aio_request is failed\n"); - free_aio_req(s, aio_req); + free_aio_req(aio_req); acb->ret = -EIO; goto out; }