mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
rbd: remove unused constants and fields
RBDAIOCB.status was only used for cancel, which was removed in7691e24dbe
. RBDAIOCB.sector_num was never used. RADOSCB.done and rcbid were never used. RBD_FD* are obsolete since the pipe was removed ine04fb07fd1
. Signed-off-by: Josh Durgin <jdurgin@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
80a1e13091
commit
3dbf00e058
1 changed files with 0 additions and 10 deletions
10
block/rbd.c
10
block/rbd.c
|
@ -74,25 +74,18 @@ typedef struct RBDAIOCB {
|
||||||
QEMUIOVector *qiov;
|
QEMUIOVector *qiov;
|
||||||
char *bounce;
|
char *bounce;
|
||||||
RBDAIOCmd cmd;
|
RBDAIOCmd cmd;
|
||||||
int64_t sector_num;
|
|
||||||
int error;
|
int error;
|
||||||
struct BDRVRBDState *s;
|
struct BDRVRBDState *s;
|
||||||
int status;
|
|
||||||
} RBDAIOCB;
|
} RBDAIOCB;
|
||||||
|
|
||||||
typedef struct RADOSCB {
|
typedef struct RADOSCB {
|
||||||
int rcbid;
|
|
||||||
RBDAIOCB *acb;
|
RBDAIOCB *acb;
|
||||||
struct BDRVRBDState *s;
|
struct BDRVRBDState *s;
|
||||||
int done;
|
|
||||||
int64_t size;
|
int64_t size;
|
||||||
char *buf;
|
char *buf;
|
||||||
int64_t ret;
|
int64_t ret;
|
||||||
} RADOSCB;
|
} RADOSCB;
|
||||||
|
|
||||||
#define RBD_FD_READ 0
|
|
||||||
#define RBD_FD_WRITE 1
|
|
||||||
|
|
||||||
typedef struct BDRVRBDState {
|
typedef struct BDRVRBDState {
|
||||||
rados_t cluster;
|
rados_t cluster;
|
||||||
rados_ioctx_t io_ctx;
|
rados_ioctx_t io_ctx;
|
||||||
|
@ -405,7 +398,6 @@ static void qemu_rbd_complete_aio(RADOSCB *rcb)
|
||||||
}
|
}
|
||||||
qemu_vfree(acb->bounce);
|
qemu_vfree(acb->bounce);
|
||||||
acb->common.cb(acb->common.opaque, (acb->ret > 0 ? 0 : acb->ret));
|
acb->common.cb(acb->common.opaque, (acb->ret > 0 ? 0 : acb->ret));
|
||||||
acb->status = 0;
|
|
||||||
|
|
||||||
qemu_aio_unref(acb);
|
qemu_aio_unref(acb);
|
||||||
}
|
}
|
||||||
|
@ -621,7 +613,6 @@ static BlockAIOCB *rbd_start_aio(BlockDriverState *bs,
|
||||||
acb->error = 0;
|
acb->error = 0;
|
||||||
acb->s = s;
|
acb->s = s;
|
||||||
acb->bh = NULL;
|
acb->bh = NULL;
|
||||||
acb->status = -EINPROGRESS;
|
|
||||||
|
|
||||||
if (cmd == RBD_AIO_WRITE) {
|
if (cmd == RBD_AIO_WRITE) {
|
||||||
qemu_iovec_to_buf(acb->qiov, 0, acb->bounce, qiov->size);
|
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;
|
size = nb_sectors * BDRV_SECTOR_SIZE;
|
||||||
|
|
||||||
rcb = g_new(RADOSCB, 1);
|
rcb = g_new(RADOSCB, 1);
|
||||||
rcb->done = 0;
|
|
||||||
rcb->acb = acb;
|
rcb->acb = acb;
|
||||||
rcb->buf = buf;
|
rcb->buf = buf;
|
||||||
rcb->s = acb->s;
|
rcb->s = acb->s;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue