Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1477256imw; Sat, 16 Jul 2022 07:27:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vIpVLeMxeHx/UxSodtwtunNH+OmQFKpZ2fFvY8VEysqpgRyhFe/27kxxLN1KR8u/W85FGH X-Received: by 2002:a17:902:e80a:b0:16c:408c:e532 with SMTP id u10-20020a170902e80a00b0016c408ce532mr19212034plg.144.1657981679726; Sat, 16 Jul 2022 07:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657981679; cv=none; d=google.com; s=arc-20160816; b=gj7wn9dOKLnWaNOyniiUtYDyJERHuKNbMWPa9sM4+OqDfKxh3K+/z8SXq7WqA90Z2t k+rWBGGcJXcqenQtc2ricmnqh2xOjAWGZ1eAluYesR2lkElabSDXxAQtiAFxUVuoH1W0 0EtX6ub/GP+57eCYTB8LyXJdXi9SQXfVEtjeeghcNJXttqBUO7bILFpbDkwnyaCgzw4P xTpXF+XHprz6dsdXG8GIhDiAvtOvkUQO2j3h+K4IAZaq5Rl/g21xBakuJsG8XDTb0Jn0 1bSriL9j2R+/FMQ0NOGpD7uAK+bIHgIaueHS1fPdLc24M9snPA2f51gTO0VHN3VNONzu HIeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :mail-followup-to:message-id:subject:cc:to:from:date:dkim-signature; bh=oWtSQ3iq/eBfO8cWY36mPzg837zTY4BQyIHIDxunfnc=; b=XJOFp9gnAHJLQ5MKQ5CZRBLUZqb1NNVaw1g+SOaLJlCaFdj/R/8hE6Mui0N/BxLCm2 dnrKChpH2qIkAovoUr+ctrJNsxTdP8lEr4Lya/rT8Da1TsxC+L0asOCoJzibsp8k/q+X sS1Rj5oXGQL6cyFzmQeg2UNmq4cNdIwYXNcexTDCMnwozvTZvAQxyJlVGgwCUNLl6N7f zLAyLzQytkoQG/6LK/Qvkk/2rcps7uOOoxrjh5W4ACFGNcNm2q+nqS9TeYvDsxMgunH+ I2kUZLfSNmmZ9R/CMWEJOSGoIbqSrXSuqaAFwsv15xFloeAmJSguDh1jEmiOOGH3Jc+8 38Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=DqZIO+Bt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h22-20020a63c016000000b00414ec29c59esi9827141pgg.426.2022.07.16.07.27.43; Sat, 16 Jul 2022 07:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=DqZIO+Bt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231644AbiGPOLQ (ORCPT + 99 others); Sat, 16 Jul 2022 10:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiGPOLP (ORCPT ); Sat, 16 Jul 2022 10:11:15 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65BFE13F20; Sat, 16 Jul 2022 07:11:14 -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 084231FD7A; Sat, 16 Jul 2022 14:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1657980673; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=oWtSQ3iq/eBfO8cWY36mPzg837zTY4BQyIHIDxunfnc=; b=DqZIO+BtiutLzd0dvPdk4yLD73rbqsDwOsatqhzBZ1RKmm3RtkpUtNWqFqBnM6yDisUTyx 4g/aUYH+eNv8qbhLCYwkcba0MaLXmgcrD4iLikMfB5MIvMBR3XGu+bUaHYt9RVRom4Pzmx YXRzq6mq6ZMO1pOvtUGBIEBxaw+SlrY= 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 CDFC81351D; Sat, 16 Jul 2022 14:11:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jqgrMQDH0mI6XgAAMHmgww (envelope-from ); Sat, 16 Jul 2022 14:11:12 +0000 Date: Sat, 16 Jul 2022 16:06:20 +0200 From: David Sterba To: torvalds@linux-foundation.org Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org Subject: [GIT PULL] Btrfs fixes for 5.19-rc7 Message-ID: Mail-Followup-To: David Sterba , torvalds@linux-foundation.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, due to a recent report [1] we need to revert the radix tree to xarray conversion patches. There's a problem with sleeping under spinlock, when xa_insert could allocate memory under pressure. We use GFP_NOFS so this is a real problem that we unfortunately did not discover during review. I'm sorry to do such change at rc6 time but the revert is IMO the safer option, there are patches to use mutex instead of the spin locks but that would need more testing. The revert branch has been tested on a few setups, all seem ok. The conversion to xarray will be revisited in the future. [1] https://lore.kernel.org/linux-btrfs/cover.1657097693.git.fdmanana@suse.com/ Note about the xarray API: The possible sleeping is documented next to xa_insert, however there's no runtime check for that, like is eg. in radix_tree_preload. The context does not need to be atomic so it's not as simple as might_sleep_if(gfpflags_allow_blocking(gfp)); or WARN_ON_ONCE(gfpflags_allow_blocking(gfp)); Some kind of development time debugging/assertion aid would be nice. ---------------------------------------------------------------- The following changes since commit b3a3b0255797e1d395253366ba24a4cc6c8bdf9c: btrfs: zoned: drop optimization of zone finish (2022-07-08 19:18:00 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.19-rc7-tag for you to fetch changes up to 088aea3b97e0ae5a2a86f5d142ad10fec8a1b80f: Revert "btrfs: turn delayed_nodes_tree into an XArray" (2022-07-15 19:15:19 +0200) ---------------------------------------------------------------- David Sterba (4): Revert "btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray" Revert "btrfs: turn fs_info member buffer_radix into XArray" Revert "btrfs: turn name_cache radix tree into XArray in send_ctx" Revert "btrfs: turn delayed_nodes_tree into an XArray" fs/btrfs/ctree.h | 18 ++--- fs/btrfs/delayed-inode.c | 84 ++++++++++---------- fs/btrfs/disk-io.c | 179 ++++++++++++++++++++++++------------------- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/extent_io.c | 122 +++++++++++++++++------------ fs/btrfs/inode.c | 15 ++-- fs/btrfs/send.c | 40 +++++----- fs/btrfs/tests/btrfs-tests.c | 24 +++++- fs/btrfs/transaction.c | 112 +++++++++++++++------------ 9 files changed, 340 insertions(+), 256 deletions(-)