From 88be7b4be4aa17c88247e162bdd7577ea79db94f Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 20 May 2016 18:49:07 +0200 Subject: block: Fix bdrv_next() memory leak The bdrv_next() users all leaked the BdrvNextIterator after completing the iteration. Simply changing bdrv_next() to free the iterator before returning NULL at the end of list doesn't work because some callers exit the loop before looking at all BDSes. This patch moves the BdrvNextIterator from the heap to the stack of the caller and switches to a bdrv_first()/bdrv_next() interface for initialising the iterator. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng --- include/block/block.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index a8c15e3..770ca26 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -17,7 +17,6 @@ typedef struct BlockJob BlockJob; typedef struct BdrvChild BdrvChild; typedef struct BdrvChildRole BdrvChildRole; typedef struct BlockJobTxn BlockJobTxn; -typedef struct BdrvNextIterator BdrvNextIterator; typedef struct BlockDriverInfo { /* in bytes, 0 if irrelevant */ @@ -402,7 +401,19 @@ BlockDriverState *bdrv_lookup_bs(const char *device, Error **errp); bool bdrv_chain_contains(BlockDriverState *top, BlockDriverState *base); BlockDriverState *bdrv_next_node(BlockDriverState *bs); -BdrvNextIterator *bdrv_next(BdrvNextIterator *it, BlockDriverState **bs); + +typedef struct BdrvNextIterator { + enum { + BDRV_NEXT_BACKEND_ROOTS, + BDRV_NEXT_MONITOR_OWNED, + } phase; + BlockBackend *blk; + BlockDriverState *bs; +} BdrvNextIterator; + +BlockDriverState *bdrv_first(BdrvNextIterator *it); +BlockDriverState *bdrv_next(BdrvNextIterator *it); + BlockDriverState *bdrv_next_monitor_owned(BlockDriverState *bs); int bdrv_is_encrypted(BlockDriverState *bs); int bdrv_key_required(BlockDriverState *bs); -- cgit v1.1 From 28eb9b12f7280287c7b693edd351f28ae0d99e60 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Tue, 17 May 2016 16:41:29 +0200 Subject: block: Drop blk_new_with_bs() Its only caller is blk_new_open(), so we can just inline it there. The bdrv_new_root() call is dropped in the process because we can just let bdrv_open() create the BDS. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 68d92b5..d0db3c3 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -79,7 +79,6 @@ typedef struct BlockBackendPublic { } BlockBackendPublic; BlockBackend *blk_new(Error **errp); -BlockBackend *blk_new_with_bs(Error **errp); BlockBackend *blk_new_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp); int blk_get_refcnt(BlockBackend *blk); -- cgit v1.1 From 9bddf759790cf1b9c46889f8f8370c90e6ca7610 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Tue, 17 May 2016 16:41:30 +0200 Subject: block: Drop bdrv_new_root() It is unused now, so we may just as well drop it. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 770ca26..348e478 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -197,7 +197,6 @@ BlockDriver *bdrv_find_format(const char *format_name); int bdrv_create(BlockDriver *drv, const char* filename, QemuOpts *opts, Error **errp); int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp); -BlockDriverState *bdrv_new_root(void); BlockDriverState *bdrv_new(void); void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top); void bdrv_replace_in_backing_chain(BlockDriverState *old, -- cgit v1.1 From 5b3639371c3e220b41cd2eae8c34c49ad38ef527 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Tue, 17 May 2016 16:41:31 +0200 Subject: block: Make bdrv_open() return a BDS There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret = bdrv_open(&bs, ..., &local_err); if (ret < 0) { error_propagate(errp, local_err); ... } by bs = bdrv_open(..., errp); if (!bs) { ret = -EINVAL; ... } Of course, there are only a few instances where the pattern is really pure. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 348e478..e899f7d 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -212,8 +212,8 @@ BdrvChild *bdrv_open_child(const char *filename, void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd); int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options, const char *bdref_key, Error **errp); -int bdrv_open(BlockDriverState **pbs, const char *filename, - const char *reference, QDict *options, int flags, Error **errp); +BlockDriverState *bdrv_open(const char *filename, const char *reference, + QDict *options, int flags, Error **errp); BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, BlockDriverState *bs, QDict *options, int flags); -- cgit v1.1 From 109525ad6a2f5d720ee0802df7ab1e3decbeeb21 Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Tue, 17 May 2016 16:41:34 +0200 Subject: block: Drop errp parameter from blk_new() blk_new() cannot fail so its Error ** parameter has become superfluous. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index d0db3c3..9d6615c 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -78,7 +78,7 @@ typedef struct BlockBackendPublic { QLIST_ENTRY(BlockBackendPublic) round_robin; } BlockBackendPublic; -BlockBackend *blk_new(Error **errp); +BlockBackend *blk_new(void); BlockBackend *blk_new_open(const char *filename, const char *reference, QDict *options, int flags, Error **errp); int blk_get_refcnt(BlockBackend *blk); -- cgit v1.1 From 36fe13317bfc3414745528c6c08cea2904ca49ec Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 17 May 2016 14:51:55 +0200 Subject: block: Fix reconfiguring graph with drained nodes When changing the BlockDriverState that a BdrvChild points to while the node is currently drained, we must call the .drained_end() parent callback. Conversely, when this means attaching a new node that is already drained, we need to call .drained_begin(). bdrv_root_attach_child() takes now an opaque parameter, which is needed because the callbacks must also be called if we're attaching a new child to the BlockBackend when the root node is already drained, and they need a way to identify the BlockBackend. Previously, child->opaque was set too late and the callbacks would still see it as NULL. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- include/block/block_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/block/block_int.h b/include/block/block_int.h index b6f4755..30a9717 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -719,7 +719,8 @@ void hmp_drive_add_node(Monitor *mon, const char *optstr); BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs, const char *child_name, - const BdrvChildRole *child_role); + const BdrvChildRole *child_role, + void *opaque); void bdrv_root_unref_child(BdrvChild *child); const char *bdrv_get_parent_name(const BlockDriverState *bs); -- cgit v1.1 From cbe0ed6247a0589e4f72b25984b8afcfa9c26b1c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 23 May 2016 14:54:05 +0200 Subject: dma-helpers: change interface to byte-based Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- include/sysemu/dma.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index d6e96a4..f0e0c30 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -199,14 +199,14 @@ typedef BlockAIOCB *DMAIOFunc(BlockBackend *blk, int64_t offset, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *dma_blk_io(BlockBackend *blk, - QEMUSGList *sg, uint64_t sector_num, + QEMUSGList *sg, uint64_t offset, DMAIOFunc *io_func, BlockCompletionFunc *cb, void *opaque, DMADirection dir); BlockAIOCB *dma_blk_read(BlockBackend *blk, - QEMUSGList *sg, uint64_t sector, + QEMUSGList *sg, uint64_t offset, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *dma_blk_write(BlockBackend *blk, - QEMUSGList *sg, uint64_t sector, + QEMUSGList *sg, uint64_t offset, BlockCompletionFunc *cb, void *opaque); uint64_t dma_buf_read(uint8_t *ptr, int32_t len, QEMUSGList *sg); uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg); -- cgit v1.1 From 8a8e63ebdd5a6605af6a9df07c62b2214e1a650c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 23 May 2016 14:54:06 +0200 Subject: dma-helpers: change BlockBackend to opaque value in DMAIOFunc Callers of dma_blk_io have no way to pass extra data to the DMAIOFunc, because the original callback and opaque are gone by the time DMAIOFunc is called. On the other hand, the BlockBackend is usually derived from those extra data that you could pass to the DMAIOFunc (in the next patch, that would be the SCSIRequest). So change DMAIOFunc's prototype, decoupling it from blk_aio_readv and blk_aio_writev's. The new prototype loses the BlockBackend and gains an extra opaque value which, in the case of dma_blk_readv and dma_blk_writev, is of course used for the BlockBackend. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- include/sysemu/dma.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index f0e0c30..34c8eaf 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -194,14 +194,14 @@ void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len); void qemu_sglist_destroy(QEMUSGList *qsg); #endif -typedef BlockAIOCB *DMAIOFunc(BlockBackend *blk, int64_t offset, - QEMUIOVector *iov, BdrvRequestFlags flags, - BlockCompletionFunc *cb, void *opaque); +typedef BlockAIOCB *DMAIOFunc(int64_t offset, QEMUIOVector *iov, + BlockCompletionFunc *cb, void *cb_opaque, + void *opaque); -BlockAIOCB *dma_blk_io(BlockBackend *blk, +BlockAIOCB *dma_blk_io(AioContext *ctx, QEMUSGList *sg, uint64_t offset, - DMAIOFunc *io_func, BlockCompletionFunc *cb, - void *opaque, DMADirection dir); + DMAIOFunc *io_func, void *io_func_opaque, + BlockCompletionFunc *cb, void *opaque, DMADirection dir); BlockAIOCB *dma_blk_read(BlockBackend *blk, QEMUSGList *sg, uint64_t offset, BlockCompletionFunc *cb, void *opaque); -- cgit v1.1 From d004bd52aacbe9bf43c38fa6cb20a6f241ac64be Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 24 May 2016 16:25:20 -0600 Subject: block: Rename blk_write_zeroes() Commit 983a1600 changed the semantics of blk_write_zeroes() to be byte-based rather than sector-based, but did not change the name, which is an open invitation for other code to misuse the function. Renaming to pwrite_zeroes() makes it more in line with other byte-based interfaces, and will help make it easier to track which remaining write_zeroes interfaces still need conversion. Reported-by: Kevin Wolf Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- include/sysemu/block-backend.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 9d6615c..9571726 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -113,11 +113,11 @@ void *blk_get_attached_dev(BlockBackend *blk); void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque); int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf, int count); -int blk_write_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags); -BlockAIOCB *blk_aio_write_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags, - BlockCompletionFunc *cb, void *opaque); +int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset, + int count, BdrvRequestFlags flags); +BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset, + int count, BdrvRequestFlags flags, + BlockCompletionFunc *cb, void *opaque); int blk_pread(BlockBackend *blk, int64_t offset, void *buf, int count); int blk_pwrite(BlockBackend *blk, int64_t offset, const void *buf, int count, BdrvRequestFlags flags); @@ -195,8 +195,8 @@ int blk_get_open_flags_from_root_state(BlockBackend *blk); void *blk_aio_get(const AIOCBInfo *aiocb_info, BlockBackend *blk, BlockCompletionFunc *cb, void *opaque); -int coroutine_fn blk_co_write_zeroes(BlockBackend *blk, int64_t offset, - int count, BdrvRequestFlags flags); +int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, + int count, BdrvRequestFlags flags); int blk_write_compressed(BlockBackend *blk, int64_t sector_num, const uint8_t *buf, int nb_sectors); int blk_truncate(BlockBackend *blk, int64_t offset); -- cgit v1.1 From a7112795c14d99b81600f8809fda5ce18b430830 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 4 Apr 2016 16:43:51 +0300 Subject: block: keep a list of block jobs The current way to obtain the list of existing block jobs is to iterate over all root nodes and check which ones own a job. Since we want to be able to support block jobs in other nodes as well, this patch keeps a list of jobs that is updated every time one is created or destroyed. Signed-off-by: Alberto Garcia Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- include/block/blockjob.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 073a433..30bb2c6 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -135,6 +135,9 @@ struct BlockJob { */ bool deferred_to_main_loop; + /** Element of the list of block jobs */ + QLIST_ENTRY(BlockJob) job_list; + /** Status that is published by the query-block-jobs QMP API */ BlockDeviceIoStatus iostatus; @@ -173,6 +176,17 @@ struct BlockJob { }; /** + * block_job_next: + * @job: A block job, or %NULL. + * + * Get the next element from the list of block jobs after @job, or the + * first one if @job is %NULL. + * + * Returns the requested job, or %NULL if there are no more jobs left. + */ +BlockJob *block_job_next(BlockJob *job); + +/** * block_job_create: * @job_type: The class object for the newly-created job. * @bs: The block -- cgit v1.1 From a1a2af075647bb61e1435ce4c78d99e3f36d928b Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 8 Apr 2016 18:26:37 +0200 Subject: block: Cancel jobs first in bdrv_close_all() So far, bdrv_close_all() first removed all root BlockDriverStates of BlockBackends and monitor owned BDSes, and then assumed that the remaining BDSes must be related to jobs and cancelled these jobs. This order doesn't work that well any more when block jobs use BlockBackends internally because then they will lose their BDS before being cancelled. This patch changes bdrv_close_all() to first cancel all jobs and then remove all root BDSes from the remaining BBs. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- include/block/blockjob.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 30bb2c6..4ac6831 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -371,6 +371,13 @@ bool block_job_is_paused(BlockJob *job); int block_job_cancel_sync(BlockJob *job); /** + * block_job_cancel_sync_all: + * + * Synchronously cancels all jobs using block_job_cancel_sync(). + */ +void block_job_cancel_sync_all(void); + +/** * block_job_complete_sync: * @job: The job to be completed. * @errp: Error object which may be set by block_job_complete(); this is not -- cgit v1.1 From b6d2e59995fa82c7fe469d47dfc22cf9bf2f8a5e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 8 Apr 2016 14:51:09 +0200 Subject: block: Convert block job core to BlockBackend This adds a new BlockBackend field to the BlockJob struct, which coexists with the BlockDriverState while converting the individual jobs. When creating a block job, a new BlockBackend is created on top of the given BlockDriverState, and it is destroyed when the BlockJob ends. The reference to the BDS is now held by the BlockBackend instead of calling bdrv_ref/unref manually. We have to be careful when we use bdrv_replace_in_backing_chain() in block jobs because this changes the BDS that job->blk points to. At the moment block jobs are too tightly coupled with their BDS, so that moving a job to another BDS isn't easily possible; therefore, we need to just manually undo this change afterwards. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- include/block/blockjob.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 4ac6831..32012af 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -82,7 +82,8 @@ struct BlockJob { const BlockJobDriver *driver; /** The block device on which the job is operating. */ - BlockDriverState *bs; + BlockDriverState *bs; /* TODO Remove */ + BlockBackend *blk; /** * The ID of the block job. Currently the BlockBackend name of the BDS -- cgit v1.1 From 1e98fefd95ff604b48fe3ea71825449c187a7dd7 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 14 Apr 2016 16:40:16 +0200 Subject: block: Make blk_co_preadv/pwritev() public Also add trace points now that the function can be directly called. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia --- include/sysemu/block-backend.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 9571726..c04af8e 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -113,6 +113,12 @@ void *blk_get_attached_dev(BlockBackend *blk); void blk_set_dev_ops(BlockBackend *blk, const BlockDevOps *ops, void *opaque); int blk_pread_unthrottled(BlockBackend *blk, int64_t offset, uint8_t *buf, int count); +int coroutine_fn blk_co_preadv(BlockBackend *blk, int64_t offset, + unsigned int bytes, QEMUIOVector *qiov, + BdrvRequestFlags flags); +int coroutine_fn blk_co_pwritev(BlockBackend *blk, int64_t offset, + unsigned int bytes, QEMUIOVector *qiov, + BdrvRequestFlags flags); int blk_pwrite_zeroes(BlockBackend *blk, int64_t offset, int count, BdrvRequestFlags flags); BlockAIOCB *blk_aio_pwrite_zeroes(BlockBackend *blk, int64_t offset, -- cgit v1.1 From 03e35d820d18f23606b4cc821a36cda1f7936170 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 12 Apr 2016 15:15:49 +0200 Subject: stream: Use BlockBackend for I/O This changes the streaming block job to use the job's BlockBackend for performing the COR reads. job->bs isn't used by the streaming code any more afterwards. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- include/block/block.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index e899f7d..0a4b973 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -242,8 +242,6 @@ int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset, const void *buf, int count); int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); -int coroutine_fn bdrv_co_copy_on_readv(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int coroutine_fn bdrv_co_readv_no_serialising(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int coroutine_fn bdrv_co_writev(BlockDriverState *bs, int64_t sector_num, -- cgit v1.1 From 5c438bc68c5dd9671c234eb86ebf026b016b6e35 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 14 Apr 2016 13:09:53 +0200 Subject: backup: Use BlockBackend for I/O This changes the backup block job to use the job's BlockBackend for performing its I/O. job->bs isn't used by the backup code any more afterwards. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- include/block/block.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 0a4b973..70ea299 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -242,8 +242,6 @@ int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset, const void *buf, int count); int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); -int coroutine_fn bdrv_co_readv_no_serialising(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int coroutine_fn bdrv_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); /* -- cgit v1.1 From b75536c9fa742f887304769d0608557bb8e3a27f Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 18 Apr 2016 17:30:17 +0200 Subject: blockjob: Remove BlockJob.bs There is a single remaining user in qemu-img, and another one in a test case, both of which can be trivially converted to using BlockJob.blk instead. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- include/block/blockjob.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 32012af..86d2807 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -82,7 +82,6 @@ struct BlockJob { const BlockJobDriver *driver; /** The block device on which the job is operating. */ - BlockDriverState *bs; /* TODO Remove */ BlockBackend *blk; /** -- cgit v1.1