[Top][All Lists]

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

Re: aio-context question

From: Kevin Wolf
Subject: Re: aio-context question
Date: Mon, 23 Mar 2020 18:07:10 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

Am 19.03.2020 um 09:13 hat Dietmar Maurer geschrieben:
> I just saw commit 30dd65f307b647eef8156c4a33bd007823ef85cb, and noticed that 
> a similar pattern in drive_backup_prepare() and blockdev_backup_prepare().
> The calls to bdrv_try_set_aio_context() seems useless, because we already do
> that later in backup_job_create/brdv_attach.
> But I am not 100%& sure?

I'm aware that this is a common pattern (and I thought it was more than
just two additional places), but we would have to check for each place
individually whether it can be removed.

If it doesn't have any effect because it just does what will be done
later anyway, it can be removed, but that doesn't buy us much.

If it results in preventing some case (like the one fixed by 30dd65f3),
we need to check whether this case is actually safe. If it is safe, we
can remove the lines and get a new feature from it.

In both cases, I think a test case should be written together with the
removal of the code. And if we find out that it's unsafe, we should even
more write a test case that makes sure that the operation fails.


reply via email to

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