qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] rbd: remove unused constants and fields


From: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH 1/4] rbd: remove unused constants and fields
Date: Tue, 30 Jun 2015 15:47:15 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 10, 2015 at 08:28:43PM -0700, Josh Durgin wrote:
> 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 <address@hidden>
> ---
>  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;
> -- 
> 1.9.1
>

Reviewed-by: Jeff Cody <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]