qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transactio


From: Hanna Reitz
Subject: Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action
Date: Mon, 13 Jun 2022 09:12:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

On 09.06.22 16:56, Vladimir Sementsov-Ogievskiy wrote:
On 6/8/22 14:49, Hanna Reitz wrote:
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
To be used in further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
---
  block.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 48 insertions(+)

Looking at bdrv_child_try_set_aio_context(), it looks like bdrv_can_set_aio_context() were supposed to be the .prepare action, and bdrv_set_aio_context_ignore() should be the .commit action.  Can we not use it that way?




The difference is that we want the whole action be done in .prepare stage, not only the check. It's generally better: when do several actions in a transaction, actions usually depend on result of previous actions.

Ah, yes.

And I think it's necessary for graph update. Graph relations are changed during other actions .prepare phases, so I can't imagine how to postpone aio-context update to .commit phase.

OK, sounds good.

But I agree, that having both _can_ / _set_  and *tran APIs don't look good. May be we can refactor it.. But not in this series I think)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]