[Top][All Lists]

[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: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action
Date: Thu, 9 Jun 2022 17:56:58 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

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.

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.

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)

Best regards,

reply via email to

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