[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 02/25] include/block/block: split header into I/O and glob
Emanuele Giuseppe Esposito
Re: [PATCH v4 02/25] include/block/block: split header into I/O and global state API
Mon, 15 Nov 2021 13:08:56 +0100
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0
+ * I/O API functions. These functions are thread-safe, and therefore
+ * can run in any thread as long as the thread has called
+ * aio_context_acquire/release().
+int bdrv_replace_child_bs(BdrvChild *child, BlockDriverState *new_bs,
+ Error **errp);
Why is this function here? Naïvely, I would’ve assumed as a
graph-modifying function it should be in block-global-state.h.
I mean, perhaps it’s thread-safe and then it can fit here, too. Still,
it surprises me a bit to find this here.
Agree, I also tested this, it can go in global state. Will fix that.