Thread (47 messages) 47 messages, 5 authors, 2023-03-31

Re: [PATCH 18/19] dm-crypt: check if adding pages to clone bio fails

From: Damien Le Moal <hidden>
Date: 2023-03-30 00:24:42
Also in: dm-devel, linux-block, linux-btrfs, linux-fsdevel, linux-mm

On 3/30/23 09:17, Yang Shi wrote:
On Wed, Mar 29, 2023 at 4:49 PM Damien Le Moal
[off-list ref] wrote:
quoted
On 3/30/23 02:06, Johannes Thumshirn wrote:
quoted
Check if adding pages to clone bio fails and if bail out.
Nope. The code retries with direct reclaim until it succeeds. Which is very
suspicious...
It is not related to bio_add_page() failure. It is used to avoid a
race condition when two processes are depleting the mempool
simultaneously.

IIUC I don't think page merge may happen for dm-crypt, so is
__bio_add_page() good enough? I'm working on this code too, using
__bio_add_page() would make my patch easier.
If the BIO was allocated with enough bvecs, we could use that function. But page
merging reduces overhead, so if it can happen, let's use it.
quoted
quoted
This way we can mark bio_add_pages as __must_check.

Signed-off-by: Johannes Thumshirn <redacted>
With the commit message fixed,

Reviewed-by: Damien Le Moal <redacted>


--
Damien Le Moal
Western Digital Research
-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help