From patchwork Fri Nov 17 22:33:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 166415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp854363vqn; Fri, 17 Nov 2023 14:33:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDsJaAu9AGtiwZkqd81hzw79IT3FONAdd7jvt9gNWx7XTQA1OdfhNOdjS5UqhLJK/eEN5S X-Received: by 2002:a05:6808:2e90:b0:3b6:cbd1:beda with SMTP id gt16-20020a0568082e9000b003b6cbd1bedamr913081oib.39.1700260434269; Fri, 17 Nov 2023 14:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700260434; cv=none; d=google.com; s=arc-20160816; b=BzKnfUKvyHiyd7NOByIXbq4ZbRl9waPTYE9n/6xwE7xiaYvn/skKko/vlrhbjogsui DnfK0kNPnVj5bmihqCDl6IqOYWHCP/bf57csgjiYMosFtsmM0oIrKqQ2GHy50ZgwhuSt VYORkYak8+jmhEtsUnnDEcIVvV0k0jEYawlFLq+XhH4uWNK2ax6vLBDoCpXA60CMCh6+ lu4YCQTjHC7VE+HTYEaVk874ne4EzRH/XpSUeOGDFfutcYFyARa5EuHXSsfRaHDDK+2K 6E2OCKdsYKTAsMIVd6rWj6x3U8OS3FJvp8fFAIxh/OFcQqmbM0zheUq7UbXXGqO1SbVQ Ppdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:dkim-signature:date; bh=op13F3XEN7FjDKlCWlYMcAKyKy+rR7LtkeYSw6GZX7w=; fh=aznqSYAhe5NzYgYLW/V7xbfSEyFesCegLqxoNj8hWd8=; b=Kdf3Sx7A7LvcnFbzSa2bZT1TwfJF/l7n+Kd6fHMRfZQSvYv67aDZwf9OOweH0u/Usk 3logi1yVDgQcoz2q1Z6hvLE1Mfp0Qa0yo52WAhcZysnf2uiVlTdsCvtUwC8RCnL6lqu9 dbf4g0Do98Pfb0GJHrceRsH+hsFRQ+OUtu8iGU9v+0NJSSp/p2F4u1C78VdPdX/wVrmX TOY3tlzPotzCv5PLpa3+epXbNQPbVwz3ruYCW6Rf9E0RkUwHoxbb+YuH1M3Pho2WRbZ1 NxBLxHr3N1cVOm3Qb92xv6DgwhMynwln4/92EoNE0Ah+EPnSS1k2WpEUiP3RAu45Jffp gBGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZjwZV0tN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id b36-20020a631b24000000b0056b024a4dd0si2731767pgb.614.2023.11.17.14.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 14:33:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ZjwZV0tN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AD2E78328229; Fri, 17 Nov 2023 14:33:51 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346213AbjKQWde (ORCPT + 29 others); Fri, 17 Nov 2023 17:33:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230379AbjKQWde (ORCPT ); Fri, 17 Nov 2023 17:33:34 -0500 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66EBED4F for ; Fri, 17 Nov 2023 14:33:30 -0800 (PST) Date: Fri, 17 Nov 2023 17:33:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700260408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=op13F3XEN7FjDKlCWlYMcAKyKy+rR7LtkeYSw6GZX7w=; b=ZjwZV0tN5AwYZkUFXKLEJ09DiglxyMaAjiwxGcFuTLiPvZu1fiILmcfbtxQ8Hf+RzTqezS MoE8Pdnc2OcHN0a6/gVcuxR3Q5J1/Gj67jYjO3fMdtuzsslg3HAEaGsRMA0Hb4fDUiRZtF b3io4pgMS0f6C2ZVDSvlF2q3F9yOf+U= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Linus Torvalds Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] bcachefs fixes Message-ID: <20231117223325.no4eqblc5zqte5xg@moria.home.lan> MIME-Version: 1.0 Content-Disposition: inline X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 17 Nov 2023 14:33:51 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782852285051825737 X-GMAIL-MSGID: 1782852285051825737 Hi Linus, bugfix pull request for you :) Cheers, Kent The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86: Linux 6.7-rc1 (2023-11-12 16:19:07 -0800) are available in the Git repository at: https://evilpiepirate.org/git/bcachefs.git tags/bcachefs-2023-11-17 for you to fetch changes up to ba276ce5865b5a22ee96c4c5664bfefd9c1bb593: bcachefs: Fix missing locking for dentry->d_parent access (2023-11-16 16:57:19 -0500) ---------------------------------------------------------------- bcachefs bugfixes for 6.7 Lots of small fixes for minor nits and compiler warnings. Bigger items: - The six locks lost wakeup is finally fixed: six_read_trylock() was checking for the waiting bit before decrementing the number of readers - validated the fix with a torture test. - Fix for a memory reclaim issue: when needing to reallocate a key cache key, we now do our usual GFP_NOWAIT; unlock(); GFP_KERNEL dance. - Multiple deleted inodes btree fixes - Fix an issue in fsck, where i_nlink would be recalculated incorrectly for hardlinked files if a snapshot had ever been taken. - Kill journal pre-reservations: This is a bigger patch than I would normally send at this point, but it deletes code and it fixes some of our tests that would sporadically die with the journal getting stuck, and it's a performance improvement, too. ---------------------------------------------------------------- Daniel J Blueman (1): bcachefs: Fix potential sleeping during mount Gustavo A. R. Silva (2): bcachefs: Use DECLARE_FLEX_ARRAY() helper and fix multiple -Warray-bounds warnings bcachefs: Fix multiple -Warray-bounds warnings Jiapeng Chong (1): bcachefs: make bch2_target_to_text_sb static Kent Overstreet (18): bcachefs: Use correct fgf_t type as function argument bcachefs: Fix null ptr deref in bch2_backpointer_get_node() bcachefs: Guard against insufficient devices to create stripes bcachefs: Split out btree_key_cache_types.h bcachefs: Run btree key cache shrinker less aggressively bcachefs: btree_trans->write_locked bcachefs: Make sure to drop/retake btree locks before reclaim bcachefs: Check for nonce offset inconsistency in data_update path bcachefs: Kill journal pre-reservations bcachefs: Fix iterator leak in may_delete_deleted_inode() bcachefs: Fix error path in bch2_mount() bcachefs: Fix missing transaction commit bcachefs: Disable debug log statements bcachefs: Don't decrease BTREE_ITER_MAX when LOCKDEP=y bcachefs: Fix bch2_check_nlinks() for snapshots bcachefs: Fix no_data_io mode checksum check bcachefs: six locks: Fix lost wakeup bcachefs: Fix missing locking for dentry->d_parent access fs/bcachefs/backpointers.c | 10 +-- fs/bcachefs/bcachefs.h | 2 +- fs/bcachefs/btree_iter.c | 2 - fs/bcachefs/btree_key_cache.c | 37 ++++---- fs/bcachefs/btree_key_cache_types.h | 34 ++++++++ fs/bcachefs/btree_trans_commit.c | 169 ++++++++++++++++++++---------------- fs/bcachefs/btree_types.h | 35 +------- fs/bcachefs/btree_update_interior.c | 30 ------- fs/bcachefs/btree_update_interior.h | 1 - fs/bcachefs/data_update.c | 28 ++++++ fs/bcachefs/disk_groups.c | 4 +- fs/bcachefs/ec.c | 16 +++- fs/bcachefs/fs-io-pagecache.c | 2 +- fs/bcachefs/fs-io-pagecache.h | 2 +- fs/bcachefs/fs.c | 8 +- fs/bcachefs/fsck.c | 2 +- fs/bcachefs/inode.c | 8 +- fs/bcachefs/io_write.c | 2 +- fs/bcachefs/journal.c | 31 ------- fs/bcachefs/journal.h | 98 --------------------- fs/bcachefs/journal_io.c | 7 ++ fs/bcachefs/journal_reclaim.c | 42 ++++----- fs/bcachefs/journal_types.h | 26 ------ fs/bcachefs/six.c | 7 +- fs/bcachefs/subvolume_types.h | 2 +- fs/bcachefs/trace.h | 11 +-- fs/bcachefs/xattr.c | 9 ++ 27 files changed, 248 insertions(+), 377 deletions(-) create mode 100644 fs/bcachefs/btree_key_cache_types.h