From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Shi Date: Wed, 29 Mar 2023 17:17:46 -0700 Subject: [Cluster-devel] [PATCH 18/19] dm-crypt: check if adding pages to clone bio fails In-Reply-To: <3a0f0c92-63cb-3624-c2fe-049a76d1a64a@opensource.wdc.com> References: <3a0f0c92-63cb-3624-c2fe-049a76d1a64a@opensource.wdc.com> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wed, Mar 29, 2023 at 4:49?PM Damien Le Moal wrote: > > On 3/30/23 02:06, Johannes Thumshirn wrote: > > 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. > > > > > This way we can mark bio_add_pages as __must_check. > > > > Signed-off-by: Johannes Thumshirn > > With the commit message fixed, > > Reviewed-by: Damien Le Moal > > > -- > Damien Le Moal > Western Digital Research > >