[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request()
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req() |
Date: |
Mon, 30 Aug 2010 17:35:42 +0200 |
From: Jes Sorensen <address@hidden>
Signed-off-by: Jes Sorensen <address@hidden>
---
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;
}
--
1.7.2.2
- [Qemu-devel] [PATCH 00/14] gcc extra warning fixes, Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 01/14] Remove unused argument for nbd_client(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 06/14] Remove unused argument for encrypt_sectors(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 05/14] Remove unused argument for check_for_block_signature(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors(), Jes . Sorensen, 2010/08/30
- [Qemu-devel] [PATCH 09/14] Remove unused arguments for add_aio_request() and free_aio_req(),
Jes . Sorensen <=
- [Qemu-devel] [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Jes . Sorensen, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., malc, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Richard Henderson, 2010/08/30