mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
Block patches:
- drop block/io write notifiers - qemu-iotests enhancements to make debugging easier - rbd parsing fix - HMP qemu-io fix (for iothreads) - mirror job cancel relaxation (do not cancel in-flight requests when a READY mirror job is canceled with force=false) - document qcow2's data_file and data_file_raw features - fix iotest 297 for pylint 2.8 - block/copy-on-read refactoring -----BEGIN PGP SIGNATURE----- iQFGBAABCAAwFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAmCeqLwSHG1yZWl0ekBy ZWRoYXQuY29tAAoJEPQH2wBh1c9A9pMIAKYIlLQfSSMdy0fZ+6AHiAjaTZAaDr4G d6NDz/RONZEoxcl01LkUWJfvqH/IdCLx5q4cl9SU4+JzMdKW9K1xBLdAGousuhk/ geYqymbORj/VntJDYwp30KUlC0pLUBbuuzYN+QXrLp5qJvS9nPBcxEPjfSc6GX9z Bt+GCRW08+C4WKJ3lGu9zNGe47gTFUE/VodUYG4tKg5xZFzsAWd/PZZaVOdW0fCz /0tdxN4N82XT+cE/lA0Tm6B6L3ZueMAt8byu4BPz21M7kULNn2roVMiFKJELZlZQ 0RyDXH2jb/aH/ha6gJ4S+JhMvq45rH9GuQeAYl6IPngbta+NbZW+U4w= =+Kha -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2021-05-14' into staging Block patches: - drop block/io write notifiers - qemu-iotests enhancements to make debugging easier - rbd parsing fix - HMP qemu-io fix (for iothreads) - mirror job cancel relaxation (do not cancel in-flight requests when a READY mirror job is canceled with force=false) - document qcow2's data_file and data_file_raw features - fix iotest 297 for pylint 2.8 - block/copy-on-read refactoring # gpg: Signature made Fri 14 May 2021 17:43:40 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2021-05-14: write-threshold: deal with includes test-write-threshold: drop extra TestStruct structure test-write-threshold: drop extra tests block/write-threshold: drop extra APIs test-write-threshold: rewrite test_threshold_(not_)trigger tests block: drop write notifiers block/write-threshold: don't use write notifiers qemu-iotests: fix pylint 2.8 consider-using-with error block/copy-on-read: use bdrv_drop_filter() and drop s->active Document qemu-img options data_file and data_file_raw qemu-iotests: fix case of SOCK_DIR already in the environment qemu-iotests: let "check" spawn an arbitrary test command qemu-iotests: move command line and environment handling from TestRunner to TestEnv qemu-iotests: allow passing unittest.main arguments to the test scripts qemu-iotests: do not buffer the test output mirror: stop cancelling in-flight requests on non-force cancel in READY monitor: hmp_qemu_io: acquire aio contex, fix crash block/rbd: Add an escape-aware strchr helper iotests/231: Update expected deprecation message Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
32de74a1ac
28 changed files with 288 additions and 378 deletions
|
@ -357,7 +357,7 @@ struct BlockDriver {
|
|||
* of in-flight requests, so don't waste the time if possible.
|
||||
*
|
||||
* One example usage is to avoid waiting for an nbd target node reconnect
|
||||
* timeout during job-cancel.
|
||||
* timeout during job-cancel with force=true.
|
||||
*/
|
||||
void (*bdrv_cancel_in_flight)(BlockDriverState *bs);
|
||||
|
||||
|
@ -954,12 +954,8 @@ struct BlockDriverState {
|
|||
*/
|
||||
int64_t total_sectors;
|
||||
|
||||
/* Callback before write request is processed */
|
||||
NotifierWithReturnList before_write_notifiers;
|
||||
|
||||
/* threshold limit for writes, in bytes. "High water mark". */
|
||||
uint64_t write_threshold_offset;
|
||||
NotifierWithReturn write_threshold_notifier;
|
||||
|
||||
/* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex.
|
||||
* Reading from the list can be done with either the BQL or the
|
||||
|
@ -1084,15 +1080,6 @@ void bdrv_parse_filename_strip_prefix(const char *filename, const char *prefix,
|
|||
bool bdrv_backing_overridden(BlockDriverState *bs);
|
||||
|
||||
|
||||
/**
|
||||
* bdrv_add_before_write_notifier:
|
||||
*
|
||||
* Register a callback that is invoked before write requests are processed but
|
||||
* after any throttling or waiting for overlapping requests.
|
||||
*/
|
||||
void bdrv_add_before_write_notifier(BlockDriverState *bs,
|
||||
NotifierWithReturn *notifier);
|
||||
|
||||
/**
|
||||
* bdrv_add_aio_context_notifier:
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef BLOCK_WRITE_THRESHOLD_H
|
||||
#define BLOCK_WRITE_THRESHOLD_H
|
||||
|
||||
#include "block/block_int.h"
|
||||
#include "qemu/typedefs.h"
|
||||
|
||||
/*
|
||||
* bdrv_write_threshold_set:
|
||||
|
@ -36,27 +36,12 @@ void bdrv_write_threshold_set(BlockDriverState *bs, uint64_t threshold_bytes);
|
|||
uint64_t bdrv_write_threshold_get(const BlockDriverState *bs);
|
||||
|
||||
/*
|
||||
* bdrv_write_threshold_is_set
|
||||
* bdrv_write_threshold_check_write
|
||||
*
|
||||
* Tell if a write threshold is set for a given BDS.
|
||||
* Check whether the specified request exceeds the write threshold.
|
||||
* If so, send a corresponding event and disable write threshold checking.
|
||||
*/
|
||||
bool bdrv_write_threshold_is_set(const BlockDriverState *bs);
|
||||
|
||||
/*
|
||||
* bdrv_write_threshold_exceeded
|
||||
*
|
||||
* Return the extent of a write request that exceeded the threshold,
|
||||
* or zero if the request is below the threshold.
|
||||
* Return zero also if the threshold was not set.
|
||||
*
|
||||
* NOTE: here we assume the following holds for each request this code
|
||||
* deals with:
|
||||
*
|
||||
* assert((req->offset + req->bytes) <= UINT64_MAX)
|
||||
*
|
||||
* Please not there is *not* an actual C assert().
|
||||
*/
|
||||
uint64_t bdrv_write_threshold_exceeded(const BlockDriverState *bs,
|
||||
const BdrvTrackedRequest *req);
|
||||
void bdrv_write_threshold_check_write(BlockDriverState *bs, int64_t offset,
|
||||
int64_t bytes);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -254,7 +254,7 @@ struct JobDriver {
|
|||
/**
|
||||
* If the callback is not NULL, it will be invoked in job_cancel_async
|
||||
*/
|
||||
void (*cancel)(Job *job);
|
||||
void (*cancel)(Job *job, bool force);
|
||||
|
||||
|
||||
/** Called when the job is freed */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue