Am 20.05.2025 um 12:29 hat Fiona Ebner geschrieben:
> This is a small step in preparation to mark bdrv_drained_begin() as
> GRAPH_UNLOCKED. More concretely, it is in preparatoin to move the
> drain out of bdrv_change_aio_context() and marking that function as
> GRAPH_RDLOCK.
> 
> Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>

I noticed that all existing callers of .change_aio_ctx() apart from the
one annotated only in the previous patch are in fact even GRAPH_WRLOCK.

Maybe it's not important any more nowadays given that the assigned
AioContext of a block node is more of a default, but traditionally I
think it would have made sense to treat changing the AioContext as
changing the graph, i.e. bs->aio_context could have been GRAPH_WRLOCK.

Just posting this in case someone has more thoughts on it. I don't
necessarily disagree with using GRAPH_RDLOCK.

Reviewed-by: Kevin Wolf <kw...@redhat.com>


Reply via email to