From 095cc4d0f62513d75e9bc1da37f08d9e97f267c4 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Wed, 2 Jun 2021 08:05:51 +0200 Subject: 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 Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake Signed-off-by: Sergio Lopez Message-Id: <20210602060552.17433-2-slp@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- include/sysemu/block-backend.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sysemu') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 880e903..5423e3d 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 -- cgit v1.1