On Wed, Jun 05, 2019 at 09:34:37AM -0500, Eric Blake wrote:
While we've fixed our internal uses, external callers may still
have a
race when calling multiple nbd_aio_is_* functions in a row, since the
state can change between those functions. Is that a problem? Are there
any common state combinations (such as is_ready||is_processing) that
warrant their own API entry points so as to be race-free?
Possibly. I guess if we discover such places we could add an atomic
function like:
nbd_aio_is_state (nbd, READY|PROCESSING);
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/