diff options
| author | Sergio Lopez <slp@redhat.com> | 2021-06-02 08:05:51 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2021-06-02 14:23:20 +0200 |
| commit | 095cc4d0f62513d75e9bc1da37f08d9e97f267c4 (patch) | |
| tree | 7e274b2a5d0feb2059bac2b94ef534f1b77a6af1 /include | |
| parent | 30ebb9aa9203b5051c5c4f4e2421803b94e5f2cc (diff) | |
| download | focaccia-qemu-095cc4d0f62513d75e9bc1da37f08d9e97f267c4.tar.gz focaccia-qemu-095cc4d0f62513d75e9bc1da37f08d9e97f267c4.zip | |
block-backend: add drained_poll
Allow block backends to poll their devices/users to check if they have been quiesced when entering a drained section. This will be used in the next patch to wait for the NBD server to be completely quiesced. Suggested-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Sergio Lopez <slp@redhat.com> Message-Id: <20210602060552.17433-2-slp@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sysemu/block-backend.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 880e903293..5423e3d9c6 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -66,6 +66,10 @@ typedef struct BlockDevOps { * Runs when the backend's last drain request ends. */ void (*drained_end)(void *opaque); + /* + * Is the device still busy? + */ + bool (*drained_poll)(void *opaque); } BlockDevOps; /* This struct is embedded in (the private) BlockBackend struct and contains |