From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5C46C433EF for ; Tue, 12 Jul 2022 11:45:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbiGLLpp (ORCPT ); Tue, 12 Jul 2022 07:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiGLLpn (ORCPT ); Tue, 12 Jul 2022 07:45:43 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CCF8B1CDF for ; Tue, 12 Jul 2022 04:45:42 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3894C1FA40; Tue, 12 Jul 2022 11:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1657626341; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V1S8qogZiRC80TfH0l8t4zL3x9N9mKGcMQ45SdoKZTc=; b=fRbOwQ6Nsb12sWz48kQ8UyAeW8a1uuOixRlta7T/z9Neb5mC4XFCPSNJ5biI7wyvc7YoF2 kZ+nZZ97ixgFA8HdH1OhFzUH0R8Y/GnHeyaEzGgJbvNT9O4kbAGfGRJW7iKSMY/S81h/Wk LZtmIUI9WrfK4MYojTvBTUnZT+z8u1k= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 02A1313638; Tue, 12 Jul 2022 11:45:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LN1DOeRezWL/EQAAMHmgww (envelope-from ); Tue, 12 Jul 2022 11:45:40 +0000 Message-ID: Date: Tue, 12 Jul 2022 14:45:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 0/3] btrfs: fix a couple sleeps while holding a spinlock Content-Language: en-US To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org References: From: Nikolay Borisov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 6.07.22 г. 12:09 ч., fdmanana@kernel.org wrote: > From: Filipe Manana > > After the recent conversions of a couple radix trees to XArrays, we now > can end up attempting to sleep while holding a spinlock. This happens > because if xa_insert() allocates memory (using GFP_NOFS) it may need to > sleep (more likely to happen when under memory pressure). In the old > code this did not happen because we had radix_tree_preload() called > before taking the spinlocks. > > Filipe Manana (3): > btrfs: fix sleep while under a spinlock when allocating delayed inode > btrfs: fix sleep while under a spinlock when inserting a fs root > btrfs: free qgroup metadata without holding the fs roots lock > > fs/btrfs/ctree.h | 6 +++--- > fs/btrfs/delayed-inode.c | 24 ++++++++++++------------ > fs/btrfs/disk-io.c | 38 +++++++++++++++++++------------------- > fs/btrfs/inode.c | 30 ++++++++++++++++-------------- > fs/btrfs/relocation.c | 11 +++++++---- > fs/btrfs/transaction.c | 14 +++++++------- > 6 files changed, 64 insertions(+), 59 deletions(-) > Reviewed-by: Nikolay Borisov