From patchwork Thu Nov 17 03:09:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046042 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 839A5C43217 for ; Thu, 17 Nov 2022 03:09:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232921AbiKQDJc (ORCPT ); Wed, 16 Nov 2022 22:09:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232548AbiKQDJb (ORCPT ); Wed, 16 Nov 2022 22:09:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BB848760 for ; Wed, 16 Nov 2022 19:09:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 710AF61FDE for ; Thu, 17 Nov 2022 03:09:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0360C433D6; Thu, 17 Nov 2022 03:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654569; bh=YToMC5+vzDP5NlTQHjqYAY65L9O8OrKzxMska+SZxhU=; h=Date:From:To:Cc:Subject:From; b=URk4lLi9gKq4+eaRb1Nb7cq0uL9fjyG0XTwPq70vPmpSLxxtjI1ICxr6PMvo9OKvk mFtpHbM/7KK8aDxjBNdXPkNvKxGrjdXe5SkOv0YzOFF8d8ZDdBxWIpDhWjue6M8x91 I4igmlo+B4wVp5M/KQDO867AwxFbkJNn4yNK0xm/H17obTtxVwQGwujbUfcE45X5xm Lfb+HsPJbzAvTZ/3eW0m20yRaGAygATxJ7vFArYvDCxlJ4S9otUYwR1GAsZxvV1y9R 737HK1RVPrvzd7j6N57jNpL2HFEJpOYBrM5jVIBiwX/kXg4W55iG7Wzfd0Bxs+wFjA TVIiDtDFD6Zgw== Date: Wed, 16 Nov 2022 19:09:29 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 1/7] xfs: fix handling of AG[IF] header buffers during scrub Message-ID: <166865410783.2381691.17025509830045469038.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit f0c4d9fc9cc9462659728d168387191387e903cc: Linux 6.1-rc4 (2022-11-06 15:07:11 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-fix-ag-header-handling-6.2_2022-11-16 for you to fetch changes up to b255fab0f80cc65a334fcd90cd278673cddbc988: xfs: make AGFL repair function avoid crosslinked blocks (2022-11-16 15:25:01 -0800) ---------------------------------------------------------------- xfs: fix handling of AG[IF] header buffers during scrub While reading through the online fsck code, I noticed that the setup code for AG metadata scrubs will attach the AGI, the AGF, and the AGFL buffers to the transaction. It isn't necessary to hold the AGFL buffer, since any code that wants to do anything with the AGFL will need to hold the AGF to know which parts of the AGFL are active. Therefore, we only need to hold the AGFL when scrubbing the AGFL itself. The second bug fixed by this patchset is one that I observed while testing online repair. When a buffer is held across a transaction roll, its buffer log item will be detached if the bli was clean before the roll. If we are holding the AG headers to maintain a lock on an AG, we then need to set the buffer type on the new bli to avoid confusing the logging code later. There's also a bug fix for uninitialized memory in the directory scanner that didn't fit anywhere else. Ths patchset finishes off by teaching the AGFL repair function to look for and discard crosslinked blocks instead of putting them back on the AGFL. v23.2: Log the buffers before rolling the transaction to keep the moving forward in the log and avoid the bli falling off. Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (4): xfs: fully initialize xfs_da_args in xchk_directory_blocks xfs: don't track the AGFL buffer in the scrub AG context xfs: log the AGI/AGF buffers when rolling transactions during an AG repair xfs: make AGFL repair function avoid crosslinked blocks fs/xfs/scrub/agheader.c | 47 +++++++++++++++---------- fs/xfs/scrub/agheader_repair.c | 79 +++++++++++++++++++++++++++++++++++------- fs/xfs/scrub/common.c | 8 ----- fs/xfs/scrub/dir.c | 10 +++--- fs/xfs/scrub/repair.c | 41 ++++++++++++++-------- fs/xfs/scrub/scrub.h | 1 - 6 files changed, 128 insertions(+), 58 deletions(-) From patchwork Thu Nov 17 03:09:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046043 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 92AF2C4332F for ; Thu, 17 Nov 2022 03:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234345AbiKQDJr (ORCPT ); Wed, 16 Nov 2022 22:09:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232548AbiKQDJq (ORCPT ); Wed, 16 Nov 2022 22:09:46 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17BFD4876D for ; Wed, 16 Nov 2022 19:09:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 4C876CE1D52 for ; Thu, 17 Nov 2022 03:09:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B72DC433D6; Thu, 17 Nov 2022 03:09:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654582; bh=DNbeK2ZnI8arW1yRyr+BIoeq/XFdhUca/xtrDH//URY=; h=Date:From:To:Cc:Subject:From; b=h0bsdNbCzAfSSEta0QzYY7Ql1Tx2eMY57TY5m+yq1hrtanezKvVJCSomd8isWSKIH DWKaY05UstmY5gcuCeJN2N+Lgav79i4naGXH7xyaDzsqhG9KzpfwdZ3kDggaVcTdLQ iygg99rRAjBG2yqDpY44zq2ibxsCF9OykppW7CmQlByHBJb4sja5EpkaDCrcTpHrVt U8P53NlrwxZC4/PBRyeOo31LTWXXXCdEjYKZukvA6UKRV1gCZOFLoPLhiWHwc4BZPF JON1LKGub1bGG6lA7WgSDJp4evqLmpoHTMvJ0BR+o8KAu8q/NI0tdTopanTrDB+R7/ G+gch1BWtHg3g== Date: Wed, 16 Nov 2022 19:09:41 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 2/7] xfs: clean up memory allocations in online fsck Message-ID: <166865411034.2381691.6691985084316997644.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit b255fab0f80cc65a334fcd90cd278673cddbc988: xfs: make AGFL repair function avoid crosslinked blocks (2022-11-16 15:25:01 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-cleanup-malloc-6.2_2022-11-16 for you to fetch changes up to 306195f355bbdcc3eff6cffac05bcd93a5e419ed: xfs: pivot online scrub away from kmem.[ch] (2022-11-16 15:25:02 -0800) ---------------------------------------------------------------- xfs: clean up memory allocations in online fsck This series standardizes the GFP_ flags that we use for memory allocation in online scrub, and convert the callers away from the old kmem_alloc code that was ported from Irix. Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (3): xfs: standardize GFP flags usage in online scrub xfs: initialize the check_owner object fully xfs: pivot online scrub away from kmem.[ch] fs/xfs/scrub/agheader.c | 2 +- fs/xfs/scrub/agheader_repair.c | 2 +- fs/xfs/scrub/attr.c | 11 +++++------ fs/xfs/scrub/bitmap.c | 11 ++++++----- fs/xfs/scrub/btree.c | 14 ++++++++------ fs/xfs/scrub/dabtree.c | 4 ++-- fs/xfs/scrub/fscounters.c | 2 +- fs/xfs/scrub/refcount.c | 12 ++++++------ fs/xfs/scrub/scrub.c | 6 +++--- fs/xfs/scrub/scrub.h | 9 +++++++++ fs/xfs/scrub/symlink.c | 2 +- 11 files changed, 43 insertions(+), 32 deletions(-) From patchwork Thu Nov 17 03:13:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046050 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 6888CC433FE for ; Thu, 17 Nov 2022 03:13:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233752AbiKQDNb (ORCPT ); Wed, 16 Nov 2022 22:13:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234004AbiKQDNa (ORCPT ); Wed, 16 Nov 2022 22:13:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33274BE31 for ; Wed, 16 Nov 2022 19:13:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 990EFB81E82 for ; Thu, 17 Nov 2022 03:13:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51B4CC433C1; Thu, 17 Nov 2022 03:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654805; bh=4uLlKWe30bclA7z5L84/imAYnhEysMggcJxDbrmmCtw=; h=Date:From:To:Cc:Subject:From; b=Xu2n+WuDqP+j+p6aDGsWZ3ymnXSMuFZhnxiyFwTvxTU5fl2/xf8QOpsajRU/XQTN2 jVZFyJtsm2DzHR2t6N7BSlvAm5+PV07gei7Z9XbKCZ2uNAsl+zxGtMgS5sS9VmpFzC xTrmF6txqQLLWlHkLkd4URP4jjtvKkQ3vpM+okSioxaD6/wf6kqMArkDVTrl9j5MZ0 2rBLI5oS8fsCoUEKpojfmzDA16PXg+jBn5Qk8SPZr8vxEz3KKEf9f/h82x71LQftu4 C7ETzrTudZXMHJc0fVLP6N9qPYQnNJWPwHrxEHcHqSsVKdM+VjGu+or4fF2+lsvEfA 17O3jVo7IJEpQ== Date: Wed, 16 Nov 2022 19:13:24 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 3/7] xfs: fix incorrect return values in online fsck Message-ID: <166865411276.2381691.13135023380195566717.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit 306195f355bbdcc3eff6cffac05bcd93a5e419ed: xfs: pivot online scrub away from kmem.[ch] (2022-11-16 15:25:02 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-fix-return-value-6.2_2022-11-16 for you to fetch changes up to 93b0c58ed04b6cbe45354f23bb5628fff31f9084: xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed (2022-11-16 15:25:03 -0800) ---------------------------------------------------------------- xfs: fix incorrect return values in online fsck Here we fix a couple of problems with the errno values that we return to userspace. v23.2: fix vague wording of comment v23.3: fix the commit message to discuss what's really going on in this patch Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (4): xfs: return EINTR when a fatal signal terminates scrub xfs: fix return code when fatal signal encountered during dquot scrub xfs: don't retry repairs harder when EAGAIN is returned xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed fs/xfs/scrub/common.h | 2 +- fs/xfs/scrub/quota.c | 2 +- fs/xfs/scrub/repair.c | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) From patchwork Thu Nov 17 03:13:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046051 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 BBADCC433FE for ; Thu, 17 Nov 2022 03:13:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbiKQDNe (ORCPT ); Wed, 16 Nov 2022 22:13:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234004AbiKQDNc (ORCPT ); Wed, 16 Nov 2022 22:13:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6769FBE31 for ; Wed, 16 Nov 2022 19:13:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 029A66207B for ; Thu, 17 Nov 2022 03:13:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63B99C433D6; Thu, 17 Nov 2022 03:13:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654810; bh=7B5aSIVtJsIA1lwZYq73R/FyGUpSWmjmoiEnsNmV8Xk=; h=Date:From:To:Cc:Subject:From; b=GUCLYwTF1BiBjeY1WbVb1gQhwRtCpGPwR2c7M4C5ht4ynepjUxx77qm8QPOLtS013 Un8TcThNiR3qdMZrQ2ju0BldM5NRe7XmohTxnY/YiqCKNRM7JxTmTL0lyp2yM1qHsZ nXFpywrlBT62tcL+VSWv/Qh0tK+vVzigq+bDcuORWhV0e+NfaQvVjXdLRwq7Vs0fQc PKWKekyEjT9Lbxj++UykXCRh/wKybgabQeJcl81ulpXEUUNqUpwwSknYIDQzBhyhPN QufnOjzFGq6tZyTB0XrwxdZNTFjBUvYhvi4hyEJ/X9XoyGZYksVXOnE/VexOns2SbR 8JyU4wbBLbq4w== Date: Wed, 16 Nov 2022 19:13:29 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 4/7] xfs: improve rt metadata use for scrub Message-ID: <166865411531.2381691.16629270315712295691.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit 93b0c58ed04b6cbe45354f23bb5628fff31f9084: xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed (2022-11-16 15:25:03 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-fix-rtmeta-ilocking-6.2_2022-11-16 for you to fetch changes up to 5f369dc5b4eb2becbdfd08924dcaf00e391f4ea1: xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file (2022-11-16 15:25:03 -0800) ---------------------------------------------------------------- xfs: improve rt metadata use for scrub This short series makes some small changes to the way we handle the realtime metadata inodes. First, we now make sure that the bitmap and summary file forks are always loaded at mount time so that every scrubber won't have to call xfs_iread_extents. This won't be easy if we're, say, cross-referencing realtime space allocations. The second change makes the ILOCK annotations more consistent with the rest of XFS. Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (2): xfs: load rtbitmap and rtsummary extent mapping btrees at mount time xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file fs/xfs/xfs_fsmap.c | 4 ++-- fs/xfs/xfs_rtalloc.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 8 deletions(-) From patchwork Thu Nov 17 03:13:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046052 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 AD479C433FE for ; Thu, 17 Nov 2022 03:13:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbiKQDNl (ORCPT ); Wed, 16 Nov 2022 22:13:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234476AbiKQDNj (ORCPT ); Wed, 16 Nov 2022 22:13:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E355615A33 for ; Wed, 16 Nov 2022 19:13:36 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 809E46207E for ; Thu, 17 Nov 2022 03:13:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFF98C433C1; Thu, 17 Nov 2022 03:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654815; bh=FnctTkyB3cvYYzfQPaI0niC8tEhh5aYcmHWS7owkLdM=; h=Date:From:To:Cc:Subject:From; b=lGbQEYZX6QG33Pcj4x6NrM4w3doW5L16HN9apLNv8JmPCheDCbfjb403DmmvxqI4C 8ibnAyBjMOKvrNuOch3Kps1KzcIKD/oAyOO1WxmVduXDqdD3nCY0uGJjwlhPkglH2n Tlm4qPRmlLKppkpkgnb53YnwQ/8SpZ6eMEhOg/uI5ILvXAKWcEGIa9P/ui7o5KDTvW R8+RL6LgByeNVJd2dqgI+vIB1vW01uz9an64V3CBV/uvLLnzEdFqrMzmwL+bJChzsi AtIi8ZXCnSPNUeT+tMm5oH8xXay8b2veg7qhPUCgm7r4Y6P0zaNk2EluH05DvdgwLI EUEt3tJy5wUug== Date: Wed, 16 Nov 2022 19:13:35 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 5/7] xfs: enhance fs summary counter scrubber Message-ID: <166865411790.2381691.6594401591217870651.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit 5f369dc5b4eb2becbdfd08924dcaf00e391f4ea1: xfs: make rtbitmap ILOCKing consistent when scanning the rt bitmap file (2022-11-16 15:25:03 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-fscounters-enhancements-6.2_2022-11-16 for you to fetch changes up to e74331d6fa2c21a8ecccfe0648dad5193b83defe: xfs: online checking of the free rt extent count (2022-11-16 15:25:03 -0800) ---------------------------------------------------------------- xfs: enhance fs summary counter scrubber This series makes two changes to the fs summary counter scrubber: first, we should mark the scrub incomplete when we can't read the AG headers. Second, it fixes a functionality gap where we don't actually check the free rt extent count. v23.2: fix pointless inline Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (2): xfs: skip fscounters comparisons when the scan is incomplete xfs: online checking of the free rt extent count fs/xfs/scrub/fscounters.c | 107 ++++++++++++++++++++++++++++++++++++++++++++-- fs/xfs/scrub/scrub.h | 8 ---- 2 files changed, 104 insertions(+), 11 deletions(-) From patchwork Thu Nov 17 03:13:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046053 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 9AEDAC4332F for ; Thu, 17 Nov 2022 03:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234170AbiKQDNq (ORCPT ); Wed, 16 Nov 2022 22:13:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbiKQDNp (ORCPT ); Wed, 16 Nov 2022 22:13:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A3C22A965 for ; Wed, 16 Nov 2022 19:13:44 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA29EB81E97 for ; Thu, 17 Nov 2022 03:13:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2888C433C1; Thu, 17 Nov 2022 03:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654821; bh=LOksEKl8ZhYLJlW1dxtfMxhTE7EB2iRU+XE/2Toi0eI=; h=Date:From:To:Cc:Subject:From; b=hs3iP8zKrzVsXwSS0EoRjj2SAoOEbKXC5Zq1ITwZGS8c7YmO5FIhlKy63CUjnygz9 tLQ/vJ3QN2b2zdahsLaX0E2c5m6PjLkrZOq1IxtKugPhucFY4ktoR4oK2yntho08HT vC+3llzMq5+7WL+MYdmZB7dsF89puJv0npIQ9ZIByivvzflJ3lygEUn2h3hgZXEE+4 t0ukOLBVV8UmeQg2ygo/4f/LyrgVrjv/fJQtRvdLp9LT+TZunj1wS2g3b0t/BnLPzV SPE8f42yh3CTdmjDP0oUWYpXIq2J7C7KoqdRHAg1enMYLWCmCpNCKT9iez1CDepwdl 9emUcsWSWJH1g== Date: Wed, 16 Nov 2022 19:13:41 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 6/7] xfs: strengthen file mapping scrub Message-ID: <166865412045.2381691.2208445647472093272.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. --D The following changes since commit e74331d6fa2c21a8ecccfe0648dad5193b83defe: xfs: online checking of the free rt extent count (2022-11-16 15:25:03 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-bmap-enhancements-6.2_2022-11-16 for you to fetch changes up to 5eef46358fae1a6018d9f886a3ecd30e843728dd: xfs: teach scrub to flag non-extents format cow forks (2022-11-16 15:25:05 -0800) ---------------------------------------------------------------- xfs: strengthen file mapping scrub This series strengthens the file extent mapping scrubber in various ways, such as confirming that there are enough bmap records to match up with the rmap records for this file, checking delalloc reservations, checking for no unwritten extents in metadata files, invalid CoW fork formats, and weird things like shared CoW fork extents. Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (6): xfs: fix perag loop in xchk_bmap_check_rmaps xfs: teach scrub to check for adjacent bmaps when rmap larger than bmap xfs: block map scrub should handle incore delalloc reservations xfs: check quota files for unwritten extents xfs: check that CoW fork extents are not shared xfs: teach scrub to flag non-extents format cow forks fs/xfs/scrub/bmap.c | 147 +++++++++++++++++++++++++++++++++++++++++---------- fs/xfs/scrub/quota.c | 6 ++- 2 files changed, 123 insertions(+), 30 deletions(-) From patchwork Thu Nov 17 03:15:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13046054 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 DCB3FC4332F for ; Thu, 17 Nov 2022 03:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234195AbiKQDPq (ORCPT ); Wed, 16 Nov 2022 22:15:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234404AbiKQDPn (ORCPT ); Wed, 16 Nov 2022 22:15:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BB26627F4 for ; Wed, 16 Nov 2022 19:15:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ED1F062084 for ; Thu, 17 Nov 2022 03:15:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5730BC433C1; Thu, 17 Nov 2022 03:15:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668654941; bh=ItVx99U/GTCuMIYxHBgsAVml6TOsgWGzTz0g8NWnv0c=; h=Date:From:To:Cc:Subject:From; b=l1GsvdphbJ+xMPZbpt/eG92C+uEIK8gapSFuI8PDzBn685bxBefmAUKcnWy0hVPWH mrkEz6pcarpX346IRreI+mnRwf2NJKri3Hlv46cFE66QJyGiKPyXrotns90z4LI/58 sn3jmBN7BCIYdQowg6V+0MSp/Ijpeb0f7WpGPlmVkRRMiZa8N3ZQMzv5i6ohq0SmPw bekW2OzSEdAJjp6f4lItdte8g+WPjeJ1VG3plG4V80o4/Kz2fonquJJJnUlapgRaUb tlzF5LhnXwRlggT2JVolL3+W9n6kCe0LZ8et9qNWs239gjuJLRwmJs5aGY4pxw94JW EVueYFm5eriuQ== Date: Wed, 16 Nov 2022 19:15:40 -0800 From: "Darrick J. Wong" To: djwong@kernel.org Cc: dchinner@redhat.com, linux-xfs@vger.kernel.org Subject: [GIT PULL 7/7] xfs: scrub inode core when checking metadata files Message-ID: <166865412295.2381691.4642355489538362759.stg-ugh@magnolia> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Hi Darrick, Please pull this branch with changes for xfs for 6.2-rc1. As usual, I did a test-merge with the main upstream branch as of a few minutes ago, and didn't see any conflicts. Please let me know if you encounter any problems. Finally dug through the backlog of stg-ugh related cruddities so that I can bring you all pull requests where the participants all get cc'd, the revlists actually correspond to the branches and tags that are autogenerated by the branch manager without me having to do all that manually, etc. --D The following changes since commit 5eef46358fae1a6018d9f886a3ecd30e843728dd: xfs: teach scrub to flag non-extents format cow forks (2022-11-16 15:25:05 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git tags/scrub-check-metadata-inode-records-6.2_2022-11-16 for you to fetch changes up to f36b954a1f1bf06b5746fea7ecf0fa639ac65324: xfs: check inode core when scrubbing metadata files (2022-11-16 16:11:51 -0800) ---------------------------------------------------------------- xfs: scrub inode core when checking metadata files Running the online fsck QA fuzz tests, I noticed that we were consistently missing fuzzed records in the inode cores of the realtime freespace files and the quota files. This patch adds the ability to check inode cores in xchk_metadata_inode_forks. Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (2): xfs: don't warn about files that are exactly s_maxbytes long xfs: check inode core when scrubbing metadata files fs/xfs/scrub/common.c | 40 ++++++++++++++++++++++++++++++++++------ fs/xfs/scrub/inode.c | 2 +- 2 files changed, 35 insertions(+), 7 deletions(-)