Re: [PATCH 2/2] virtio-blk: replace dataplane_start/stopping/started with enum

2022-08-08 Thread Stefan Hajnoczi
On Mon, Aug 08, 2022 at 05:41:47AM -0400, Emanuele Giuseppe Esposito wrote: > Virtio-blk uses VirtIOBlockDataPlane and VirtIOBlock to keep track of > the dataplane flags. This is completely unnecessary, as both structures > are always accessed together and we can simplify the sages with an enum. s

[PATCH 2/2] virtio-blk: replace dataplane_start/stopping/started with enum

2022-08-08 Thread Emanuele Giuseppe Esposito
Virtio-blk uses VirtIOBlockDataPlane and VirtIOBlock to keep track of the dataplane flags. This is completely unnecessary, as both structures are always accessed together and we can simplify the sages with an enum. Read/write the enum atomically, as it can be read also by iothread callbacks. Sign