From patchwork Tue Jul 30 02:40:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746443 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77E80DF60 for ; Tue, 30 Jul 2024 02:40:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307234; cv=none; b=VmrCqkBHXR3SWzKeG0sqmr67Td/eAb4r/Tii4w5pquEQ2IGd+wMFVoUq6S9PfycQn+i3NuSile+xPFcgaC3G3+/ONYUrz0CF01pC9F+kEhVfmvw/txUmmiAK6aswxx3fqDJYMsQz1Ua6TcVommTIrhSKpMc+QMLpU2KwJNxYDak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307234; c=relaxed/simple; bh=vLrt2NAEOWbjCUv8bLt43NV7zo7xhRYHDw0GIQMjrbE=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=egRSyiRrG/BkIu1Q7d75C/a7WdFOVwnOujXOIXANKWw6fWYg/DeqORMkAdl5N9G7X/CwVeCm8RunosSG3sabm10pOWKaz3kFDxYuewhsPpHUZ7J3T0GMNl1KYJQic820a8f59SY07jiWAEz17PN5xIG3PAdaYmIlJIuERKd8OTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ChQOMYUf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ChQOMYUf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E4BCC32786; Tue, 30 Jul 2024 02:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307234; bh=vLrt2NAEOWbjCUv8bLt43NV7zo7xhRYHDw0GIQMjrbE=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=ChQOMYUf+9JOINhlU+1GVMOP6sui3da4UzshpvGuXesFM/5Xdm8/P5I+XQmvNk7iK 121xkdalNV+n/iHzpeA7z8obV5hw60PfaO71NaR1obTAQ6BtxaF1szsrgji5g/hM5i 74SgIafxFcXrH7AcQXTZ3hOXKA0uNAO9mi4klxV3S8wKQfF0G1roAN+GmrTxRNlPRI a1b7VogFAyknJAC+QBCJRT3WgpGaarLPb2/LK3pEpGAniCpw0vMkl23Qnb4U46lxvP 2/FcQgBUXSkvGeY/xU6nqszoLRexqJdkPK5VQdg3LAtML2vRd4yB9kU+W1cNrb2Qjg LVB5FjapLfVkg== Date: Mon, 29 Jul 2024 19:40:33 -0700 Subject: [GIT PULL 01/23] libxfs: fixes for 6.9 From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: cmaiolino@redhat.com, hch@lst.de, linux-xfs@vger.kernel.org, santiago_kraus@yahoo.com, zeha@debian.org Message-ID: <172230457841.1455085.11565175736015940609.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 42fc61ebd061ffc63a0302a8422ed21f67e38b5f: xfsprogs: Release v6.9.0 (2024-07-22 11:05:03 +0200) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/libxfs-6.9-fixes_2024-07-29 for you to fetch changes up to c6438c3e740e139adcd6c236606498d49bbb5655: xfs_repair: don't crash on -vv (2024-07-29 17:00:59 -0700) ---------------------------------------------------------------- libxfs: fixes for 6.9 [01/28] A couple more last minute fixes for 6.9. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Chris Hofstaedtler (1): Remove support for split-/usr installs Christoph Hellwig (1): repair: btree blocks are never on the RT subvolume Darrick J. Wong (3): xfile: fix missing error unlock in xfile_fcb_find xfs_repair: don't leak the rootdir inode when orphanage already exists xfs_repair: don't crash on -vv configure.ac | 21 --------------------- debian/Makefile | 4 ++-- debian/local/initramfs.hook | 2 +- debian/rules | 5 ++--- fsck/Makefile | 4 ++-- include/builddefs.in | 2 -- include/buildmacros | 20 ++++++++++---------- libxfs/xfile.c | 6 +++--- mkfs/Makefile | 4 ++-- repair/Makefile | 4 ++-- repair/phase6.c | 7 +++++-- repair/progress.c | 2 +- repair/scan.c | 21 +++++---------------- repair/xfs_repair.c | 2 +- 14 files changed, 36 insertions(+), 68 deletions(-) From patchwork Tue Jul 30 02:40:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746444 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D3E71CD25 for ; Tue, 30 Jul 2024 02:40:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307250; cv=none; b=Q2jnr6fXd5YdKY/j9H9Gd2Pd9mFymb8Sr2nlCV8VkiaoYgYkAZEv1/qc6IiiZrqcSwWCIVrhotKC9TXYppq+79N5VHjl227ZjNLda/Y3ZeSXyHaWuf16Whl3EWQmCopJYOHlUDNH+Bo12lg+eOlRywz22Sn9ZrpFVL9sUUx8WKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307250; c=relaxed/simple; bh=4JNtQrzz2mLS+rNnRdJIkf6zIhtBiFrWTHQFk5t/4Kk=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=H420St32ScF+JrB5sdFIwafGC00D8eh5OdiZVa97c05G8Kkg/1bm+bKzqXEu0C5AOSMU9vZkkKFX0ZTFYl/uAx+aIC06/CTCBA9aZhGCeE4A1GAb+vw74CWubW3dCHVixGDri5fuWrnKOGaUbydMUA1KZFt+2ZTNw+Kpo2SDUi4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BProcQQx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BProcQQx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE1D2C32786; Tue, 30 Jul 2024 02:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307249; bh=4JNtQrzz2mLS+rNnRdJIkf6zIhtBiFrWTHQFk5t/4Kk=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=BProcQQxHAaeJnbTSF/mQx0xQAqGEjf7G0mK6B6ynxLr4sTGf9UWL62IIFRDHRaj2 URyzd+Lye+DfV/eV71heSf1xRjKBhxBLdlVIpK8YXk8+dHsK7PxW1Pe03JyrzXSXIc 30cYr5ONAzMbwk0RGvTeik693R6hutvbGqi6IDHmwPt6N9g2YW+MahLzKwBivRGXk/ Kw4sA+bOUTbum2PBudRpoaZrJZ+fShM4mN+8BSAB1lbM6rQlZyyIVXpHAEByEpBom4 LJeJZvghgHr/QqsrdLmhSKGPI0aXz9opf+3KvpaGgHCnRhO1U4wC91OFryz0ee9Mfy y99XvytZ43/rg== Date: Mon, 29 Jul 2024 19:40:49 -0700 Subject: [GIT PULL 02/23] libxfs: sync with 6.10 From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: aalbersh@redhat.com, allison.henderson@oracle.com, catherine.hoang@oracle.com, chandanbabu@kernel.org, darrick.wong@oracle.com, dchinner@redhat.com, disgoel@linux.ibm.com, hch@lst.de, john.g.garry@oracle.com, linux-xfs@vger.kernel.org, lyutoon@gmail.com, mark.tinguely@oracle.com, ojaswin@linux.ibm.com, ritesh.list@gmail.com, wen.gang.wang@oracle.com, yi.zhang@huawei.com Message-ID: <172230457952.1455085.15182694718073129861.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit c6438c3e740e139adcd6c236606498d49bbb5655: xfs_repair: don't crash on -vv (2024-07-29 17:00:59 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/libxfs-sync-6.10_2024-07-29 for you to fetch changes up to 7fbf8e036dc1d5b9caaf6f64ad4bc88d40c8292b: xfs: fix direction in XFS_IOC_EXCHANGE_RANGE (2024-07-29 17:01:05 -0700) ---------------------------------------------------------------- libxfs: sync with 6.10 [02/28] Synchronize libxfs with the kernel. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Allison Henderson (14): xfs: Increase XFS_DEFER_OPS_NR_INODES to 5 xfs: add parent pointer support to attribute code xfs: define parent pointer ondisk extended attribute format xfs: add parent pointer validator functions xfs: extend transaction reservations for parent attributes xfs: parent pointer attribute creation xfs: add parent attributes to link xfs: add parent attributes to symlink xfs: remove parent pointers in unlink xfs: Add parent pointers to rename xfs: don't return XFS_ATTR_PARENT attributes via listxattr xfs: pass the attr value to put_listent when possible xfs: don't remove the attr fork when parent pointers are enabled xfs: add a incompat feature bit for parent pointers Christoph Hellwig (26): xfs: make XFS_TRANS_LOWMODE match the other XFS_TRANS_ definitions xfs: refactor realtime inode locking xfs: free RT extents after updating the bmap btree xfs: move RT inode locking out of __xfs_bunmapi xfs: split xfs_mod_freecounter xfs: reinstate RT support in xfs_bmapi_reserve_delalloc xfs: cleanup fdblock/frextent accounting in xfs_bmap_del_extent_delay xfs: support RT inodes in xfs_mod_delalloc xfs: rework splitting of indirect block reservations xfs: stop the steal (of data blocks for RT indirect blocks) xfs: check the flags earlier in xfs_attr_match xfs: factor out a xfs_dir_lookup_args helper xfs: factor out a xfs_dir_createname_args helper xfs: factor out a xfs_dir_removename_args helper xfs: factor out a xfs_dir_replace_args helper xfs: refactor dir format helpers xfs: fix error returns from xfs_bmapi_write xfs: remove the unusued tmp_logflags variable in xfs_bmapi_allocate xfs: lift a xfs_valid_startblock into xfs_bmapi_allocate xfs: don't open code XFS_FILBLKS_MIN in xfs_bmapi_write xfs: pass the actual offset and len to allocate to xfs_bmapi_allocate xfs: remove the xfs_iext_peek_prev_extent call in xfs_bmapi_allocate xfs: fix xfs_bmap_add_extent_delay_real for partial conversions xfs: do not allocate the entire delalloc extent in xfs_bmapi_write xfs: xfs_quota_unreserve_blkres can't fail xfs: simplify iext overflow checking and upgrade Darrick J. Wong (70): xfs: pass xfs_buf lookup flags to xfs_*read_agi xfs: constify xfs_bmap_is_written_extent xfs: introduce new file range exchange ioctl xfs: create a incompat flag for atomic file mapping exchanges xfs: introduce a file mapping exchange log intent item xfs: create deferred log items for file mapping exchanges xfs: add error injection to test file mapping exchange recovery xfs: condense extended attributes after a mapping exchange operation xfs: condense directories after a mapping exchange operation xfs: condense symbolic links after a mapping exchange operation xfs: make file range exchange support realtime files xfs: capture inode generation numbers in the ondisk exchmaps log item xfs: enable logged file mapping exchange feature xfs: add an explicit owner field to xfs_da_args xfs: use the xfs_da_args owner field to set new dir/attr block owner xfs: validate attr leaf buffer owners xfs: validate attr remote value buffer owners xfs: validate dabtree node buffer owners xfs: validate directory leaf buffer owners xfs: validate explicit directory data buffer owners xfs: validate explicit directory block buffer owners xfs: validate explicit directory free block owners xfs: use atomic extent swapping to fix user file fork data xfs: repair extended attributes xfs: expose xfs_bmap_local_to_extents for online repair xfs: pass the owner to xfs_symlink_write_target xfs: check unused nlink fields in the ondisk inode xfs: try to avoid allocating from sick inode clusters xfs: pin inodes that would otherwise overflow link count xfs: remove XFS_DA_OP_REMOVE xfs: remove XFS_DA_OP_NOTIME xfs: remove xfs_da_args.attr_flags xfs: make attr removal an explicit operation xfs: rearrange xfs_da_args a bit to use less space xfs: attr fork iext must be loaded before calling xfs_attr_is_leaf xfs: fix missing check for invalid attr flags xfs: restructure xfs_attr_complete_op a bit xfs: use helpers to extract xattr op from opflags xfs: enforce one namespace per attribute xfs: rearrange xfs_attr_match parameters xfs: move xfs_attr_defer_add to xfs_attr_item.c xfs: create a separate hashname function for extended attributes xfs: allow xattr matching on name and value for parent pointers xfs: create attr log item opcodes and formats for parent pointers xfs: record inode generation in xattr update log intent items xfs: create a hashname function for parent pointers xfs: split out handle management helpers a bit xfs: add parent pointer ioctls xfs: fix unit conversion error in xfs_log_calc_max_attrsetm_res xfs: drop compatibility minimum log size computations for reflink xfs: enable parent pointers xfs: check dirents have parent pointers xfs: remove some boilerplate from xfs_attr_set xfs: make the reserved block permission flag explicit in xfs_attr_set xfs: add raw parent pointer apis to support repair xfs: remove pointless unlocked assertion xfs: split xfs_bmap_add_attrfork into two pieces xfs: actually rebuild the parent pointer xattrs xfs: teach online scrub to find directory tree structure problems xfs: report directory tree corruption in the health information xfs: introduce vectored scrub mode xfs: use unsigned ints for non-negative quantities in xfs_attr_remote.c xfs: turn XFS_ATTR3_RMT_BUF_SPACE into a function xfs: create a helper to compute the blockcount of a max sized remote value xfs: minor cleanups of xfs_attr3_rmt_blocks xfs: fix xfs_init_attr_trans not handling explicit operation codes xfs: allow symlinks with short remote targets xfs: restrict when we try to align cow fork delalloc to cowextsz hints xfs: allow unlinked symlinks and dirs with zero size xfs: fix direction in XFS_IOC_EXCHANGE_RANGE John Garry (1): xfs: Stop using __maybe_unused in xfs_alloc.c Ritesh Harjani (IBM) (1): xfs: Add cond_resched to block unmap range and reflink remap path Wengang Wang (1): xfs: make sure sb_fdblocks is non-negative Zhang Yi (2): xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset db/attr.c | 2 +- db/attrset.c | 11 +- db/iunlink.c | 4 +- db/metadump.c | 8 +- db/namei.c | 23 +- include/libxfs.h | 1 + include/xfs_inode.h | 16 + include/xfs_mount.h | 2 + include/xfs_trace.h | 15 + io/inject.c | 1 + libxfs/Makefile | 5 + libxfs/defer_item.c | 116 ++++ libxfs/defer_item.h | 13 + libxfs/init.c | 3 + libxfs/libxfs_api_defs.h | 6 +- libxfs/libxfs_priv.h | 75 ++- libxfs/util.c | 6 + libxfs/xfs_ag.c | 12 +- libxfs/xfs_ag_resv.c | 24 +- libxfs/xfs_ag_resv.h | 2 +- libxfs/xfs_alloc.c | 10 +- libxfs/xfs_attr.c | 272 ++++++---- libxfs/xfs_attr.h | 49 +- libxfs/xfs_attr_leaf.c | 154 ++++-- libxfs/xfs_attr_leaf.h | 4 +- libxfs/xfs_attr_remote.c | 102 ++-- libxfs/xfs_attr_remote.h | 8 +- libxfs/xfs_attr_sf.h | 1 + libxfs/xfs_bmap.c | 409 +++++++------- libxfs/xfs_bmap.h | 13 +- libxfs/xfs_da_btree.c | 189 ++++++- libxfs/xfs_da_btree.h | 34 +- libxfs/xfs_da_format.h | 37 +- libxfs/xfs_defer.c | 12 +- libxfs/xfs_defer.h | 10 +- libxfs/xfs_dir2.c | 283 +++++----- libxfs/xfs_dir2.h | 23 +- libxfs/xfs_dir2_block.c | 42 +- libxfs/xfs_dir2_data.c | 18 +- libxfs/xfs_dir2_leaf.c | 100 +++- libxfs/xfs_dir2_node.c | 44 +- libxfs/xfs_dir2_priv.h | 15 +- libxfs/xfs_errortag.h | 4 +- libxfs/xfs_exchmaps.c | 1232 +++++++++++++++++++++++++++++++++++++++++++ libxfs/xfs_exchmaps.h | 124 +++++ libxfs/xfs_format.h | 34 +- libxfs/xfs_fs.h | 158 +++++- libxfs/xfs_health.h | 4 +- libxfs/xfs_ialloc.c | 56 +- libxfs/xfs_ialloc.h | 5 +- libxfs/xfs_ialloc_btree.c | 4 +- libxfs/xfs_inode_buf.c | 55 +- libxfs/xfs_inode_fork.c | 63 +-- libxfs/xfs_inode_fork.h | 6 +- libxfs/xfs_log_format.h | 89 +++- libxfs/xfs_log_rlimit.c | 46 ++ libxfs/xfs_ondisk.h | 6 + libxfs/xfs_parent.c | 376 +++++++++++++ libxfs/xfs_parent.h | 110 ++++ libxfs/xfs_rtbitmap.c | 57 ++ libxfs/xfs_rtbitmap.h | 17 + libxfs/xfs_sb.c | 15 +- libxfs/xfs_shared.h | 6 +- libxfs/xfs_symlink_remote.c | 54 +- libxfs/xfs_symlink_remote.h | 8 +- libxfs/xfs_trans_resv.c | 324 ++++++++++-- libxfs/xfs_trans_space.c | 121 +++++ libxfs/xfs_trans_space.h | 29 +- mkfs/proto.c | 3 +- repair/attr_repair.c | 7 +- repair/phase6.c | 35 +- 71 files changed, 4349 insertions(+), 873 deletions(-) create mode 100644 libxfs/xfs_exchmaps.c create mode 100644 libxfs/xfs_exchmaps.h create mode 100644 libxfs/xfs_parent.c create mode 100644 libxfs/xfs_parent.h create mode 100644 libxfs/xfs_trans_space.c From patchwork Tue Jul 30 02:41:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746445 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D23C5335A5 for ; Tue, 30 Jul 2024 02:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307265; cv=none; b=VaO+A7INtCZy1AHZcQEBbfArwvnqD9fvuKhJT3EN7JLPa5CEc6hcaYBkVTN/0B+pwyyY2o+6LqMP2syBnv2GLDPij6UkQJWkP5C9RP73pw5vjJBrLT854vXS3iTWlURcArAVk+l4qzgMNHxafO+ZhsXuRf8Hgx9xqZz+cQvMIlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307265; c=relaxed/simple; bh=zZzTv1pNRZ7muiCdSWLu9qor1LN0Gd00Ci+9FLztdM4=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=ewHNt2B0ZnJwy//CaZolwLgi0b0Xq0qaBElhGZeoemiBRVwRxqUqo74cLnc5TuwXdWdVKnEdVETQEECDEF6GGB5JIUaQ3+cFAPhuIH/Sivrvd1oT8MgyVF/hCfhsoDwUD060j52W8NMszdigIC4lc7NKRMUCzccUwlCVi/vkods= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kCeJiYN1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kCeJiYN1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BAB5C32786; Tue, 30 Jul 2024 02:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307265; bh=zZzTv1pNRZ7muiCdSWLu9qor1LN0Gd00Ci+9FLztdM4=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=kCeJiYN1e485o/UlKm1xz92ADY4BTAz7twi/gKa3GZvjR83ySA1JyLO+oRIGZS/iy TInVmwy8Et/UMZc0F0IaEGwqfIdPJAECa3lq9jqddjoHsa9BaSyYPnBDi3u+yxLdZW MxkG/vo0bSLhmP/N/g4WrBIypC5uLylCxhRfESywgfl4giNoa5W1SpADPYRhp0+qZa i1pBspV8SiTWLjKGmP0pjSB7JdXLYABGDUMN9IJuDWa9VQTproOEbgpV5C22qVJWd1 A/OZm+4FnV8GfxNfmGccQtrAItU3YQ2C9rVbkWmfan2PC6mSJIBOWDtTS93dAIxfyJ JAfGazStQwoAw== Date: Mon, 29 Jul 2024 19:41:04 -0700 Subject: [GIT PULL 03/23] xfsprogs: atomic file updates From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458054.1455085.17762244821374556294.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 7fbf8e036dc1d5b9caaf6f64ad4bc88d40c8292b: xfs: fix direction in XFS_IOC_EXCHANGE_RANGE (2024-07-29 17:01:05 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/atomic-file-updates-6.10_2024-07-29 for you to fetch changes up to 39e346ba525c51dd2f405ed5d6368db712fac586: mkfs: add a formatting option for exchange-range (2024-07-29 17:01:06 -0700) ---------------------------------------------------------------- xfsprogs: atomic file updates [v30.9 03/28] This series creates a new XFS_IOC_EXCHANGE_RANGE ioctl to exchange ranges of bytes between two files atomically. This new functionality enables data storage programs to stage and commit file updates such that reader programs will see either the old contents or the new contents in their entirety, with no chance of torn writes. A successful call completion guarantees that the new contents will be seen even if the system fails. The ability to exchange file fork mappings between files in this manner is critical to supporting online filesystem repair, which is built upon the strategy of constructing a clean copy of a damaged structure and committing the new structure into the metadata file atomically. The ioctls exist to facilitate testing of the new functionality and to enable future application program designs. User programs will be able to update files atomically by opening an O_TMPFILE, reflinking the source file to it, making whatever updates they want to make, and exchange the relevant ranges of the temp file with the original file. If the updates are aligned with the file block size, a new (since v2) flag provides for exchanging only the written areas. Note that application software must quiesce writes to the file while it stages an atomic update. This will be addressed by a subsequent series. This mechanism solves the clunkiness of two existing atomic file update mechanisms: for O_TRUNC + rewrite, this eliminates the brief period where other programs can see an empty file. For create tempfile + rename, the need to copy file attributes and extended attributes for each file update is eliminated. However, this method introduces its own awkwardness -- any program initiating an exchange now needs to have a way to signal to other programs that the file contents have changed. For file access mediated via read and write, fanotify or inotify are probably sufficient. For mmaped files, that may not be fast enough. The reference implementation in XFS creates a new log incompat feature and log intent items to track high level progress of swapping ranges of two files and finish interrupted work if the system goes down. Sample code can be found in the corresponding changes to xfs_io to exercise the use case mentioned above. Note that this function is /not/ the O_DIRECT atomic untorn file writes concept that has also been floating around for years. It is also not the RWF_ATOMIC patchset that has been shared. This RFC is constructed entirely in software, which means that there are no limitations other than the general filesystem limits. As a side note, the original motivation behind the kernel functionality is online repair of file-based metadata. The atomic file content exchange is implemented as an atomic exchange of file fork mappings, which means that we can implement online reconstruction of extended attributes and directories by building a new one in another inode and exchanging the contents. Subsequent patchsets adapt the online filesystem repair code to use atomic file exchanges. This enables repair functions to construct a clean copy of a directory, xattr information, symbolic links, realtime bitmaps, and realtime summary information in a temporary inode. If this completes successfully, the new contents can be committed atomically into the inode being repaired. This is essential to avoid making corruption problems worse if the system goes down in the middle of running repair. For userspace, this series also includes the userspace pieces needed to test the new functionality, and a sample implementation of atomic file updates. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (12): man: document the exchange-range ioctl man: document XFS_FSOP_GEOM_FLAGS_EXCHRANGE libhandle: add support for bulkstat v5 libfrog: add support for exchange range ioctl family xfs_db: advertise exchange-range in the version command xfs_logprint: support dumping exchmaps log items xfs_fsr: convert to bulkstat v5 ioctls xfs_fsr: skip the xattr/forkoff levering with the newer swapext implementations xfs_io: create exchangerange command to test file range exchange ioctl libfrog: advertise exchange-range support xfs_repair: add exchange-range to file systems mkfs: add a formatting option for exchange-range db/sb.c | 2 + fsr/xfs_fsr.c | 167 +++++++++++++--------- include/jdm.h | 23 +++ io/Makefile | 48 ++++++- io/exchrange.c | 156 ++++++++++++++++++++ io/init.c | 1 + io/io.h | 1 + libfrog/Makefile | 2 + libfrog/file_exchange.c | 52 +++++++ libfrog/file_exchange.h | 15 ++ libfrog/fsgeom.c | 49 +++++-- libfrog/fsgeom.h | 1 + libhandle/jdm.c | 117 +++++++++++++++ logprint/log_misc.c | 11 ++ logprint/log_print_all.c | 12 ++ logprint/log_redo.c | 128 +++++++++++++++++ logprint/logprint.h | 6 + man/man2/ioctl_xfs_exchange_range.2 | 278 ++++++++++++++++++++++++++++++++++++ man/man2/ioctl_xfs_fsgeometry.2 | 3 + man/man8/mkfs.xfs.8.in | 7 + man/man8/xfs_admin.8 | 7 + man/man8/xfs_io.8 | 40 ++++++ mkfs/lts_4.19.conf | 1 + mkfs/lts_5.10.conf | 1 + mkfs/lts_5.15.conf | 1 + mkfs/lts_5.4.conf | 1 + mkfs/lts_6.1.conf | 1 + mkfs/lts_6.6.conf | 1 + mkfs/xfs_mkfs.c | 26 +++- repair/globals.c | 1 + repair/globals.h | 1 + repair/phase2.c | 30 ++++ repair/xfs_repair.c | 11 ++ 33 files changed, 1114 insertions(+), 87 deletions(-) create mode 100644 io/exchrange.c create mode 100644 libfrog/file_exchange.c create mode 100644 libfrog/file_exchange.h create mode 100644 man/man2/ioctl_xfs_exchange_range.2 From patchwork Tue Jul 30 02:41:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746446 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DA55DF60 for ; Tue, 30 Jul 2024 02:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307281; cv=none; b=QKxvaaKFbcwKyE68QZmIKkHJbzD76/bih4rBAIcNHAnvmQ1v9eh7/eEVwmTpHeKycfOiD4kz7BXmr25ZICcIjM0W8CaeUD7CvTK4D1xOE55FRH6g8n2PoK6hnDzq8zf6tXQCtJnFDCsl8WE6L8JUNAxhwtrVKgzW8HOuI1id6IA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307281; c=relaxed/simple; bh=WwVgIj+CpF6oPGfeH8lETlK0yhxodXct2d8wDQXgLvU=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=tWS1IZnGk5dRVnZ8ZKNOLNYlxmrYPePzg9c8o7SRIZ70rGSH0aWLr/4yUEvZN6Q6eJI1JUnJoRtTiMaLxKAO95XJfN+1tBGiFWtOJKPfvEswHEncGaTODUCsQXvUcJWtyMtaSDI4FtKaY9+kpJ0Z2YWh5S9QUzp2wsiFl3G22/o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fi9PabsD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fi9PabsD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10C29C32786; Tue, 30 Jul 2024 02:41:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307281; bh=WwVgIj+CpF6oPGfeH8lETlK0yhxodXct2d8wDQXgLvU=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=fi9PabsDE02P/tSuDPCCA3kAeEamJoq3rIuku0pd8KvJMPOJJKHaDp4Jq+8yp+BJx hS4F9YcO8YtB97MYt/0ECE3hWj2f3L5uJGt0WA4EUs8+fpgq3VsAfaZWtrMFKN4DUf qEh5G8Wez4+Ta4jhq3dup7vMOBKXGV8VVY6GfhEh0xVnFhy3Hysz3gTyxmyd//Cf77 O2dC89gdwwtyPH2PX33wRd+oyM2nAeDxRslN0nTE29IUNCpiUefYVbe/dDRa4kSAQq oE0eVQw0QXBHyRQKlfTQo+fW0nvA2rEP1J+Kc+1fmMbL59ePWfm3SJAF7D4Vjyoy4w szFE8N4Rf5XRA== Date: Mon, 29 Jul 2024 19:41:20 -0700 Subject: [GIT PULL 04/23] xfsprogs: set and validate dir/attr block owners From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458153.1455085.12133559083527891309.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 39e346ba525c51dd2f405ed5d6368db712fac586: mkfs: add a formatting option for exchange-range (2024-07-29 17:01:06 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/dirattr-validate-owners-6.10_2024-07-29 for you to fetch changes up to 7e74984e652fab200bc7319d7c3d90f6ae36be2e: xfs_{db,repair}: add an explicit owner field to xfs_da_args (2024-07-29 17:01:06 -0700) ---------------------------------------------------------------- xfsprogs: set and validate dir/attr block owners [v30.9 04/28] There are a couple of significatn changes that need to be made to the directory and xattr code before we can support online repairs of those data structures. The first change is because online repair is designed to use libxfs to create a replacement dir/xattr structure in a temporary file, and use atomic extent swapping to commit the corrected structure. To avoid the performance hit of walking every block of the new structure to rewrite the owner number, we instead change libxfs to allow callers of the dir and xattr code the ability to set an explicit owner number to be written into the header fields of any new blocks that are created. The second change is to update the dir/xattr code to actually *check* the owner number in each block that is read off the disk, since we don't currently do that. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (1): xfs_{db,repair}: add an explicit owner field to xfs_da_args db/namei.c | 1 + repair/phase6.c | 3 +++ 2 files changed, 4 insertions(+) From patchwork Tue Jul 30 02:41:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746447 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47C06DF60 for ; Tue, 30 Jul 2024 02:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307297; cv=none; b=W68OL+v57/VZB8V7RHMN1S2+TdZ+efacLwEjxfVH3PQSaT3HPu9+QOuVD0Os0Fpu6p/ax+0gaY7cLsQ9BPAmu5QwVZT+afmI2fD1dMKWkoyyjfoAl/Bnvr4eFN7D3kHwTfOZwnUiONxO5cYajq8CXHrOg1Pb564v3h/MCfodt3Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307297; c=relaxed/simple; bh=Rkblvs7josCQWWp6gV+kKYbnhVf1jav1CJJIq+cdj0Y=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=lhrn4RuAlwKRKlsZk4WcBfU8znmb46F0XEfSD7xJWtLdJNutRCvbEjG3ZFOBvGvbKwo+ClFRRPwHJfvnO5Ig1RrMhmbOrH2zZkJyJgB8FmxDdUMum6saZtNeuXa1N1aIyUscO8boLiOTTrD7BlrPj/h0Y/CT/Em9LCVdAY8cRso= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aV0v4dAB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aV0v4dAB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2C7AC32786; Tue, 30 Jul 2024 02:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307296; bh=Rkblvs7josCQWWp6gV+kKYbnhVf1jav1CJJIq+cdj0Y=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=aV0v4dAB3Akl5dCSXHC+Fy9j+p5qFbpgjOwn8HWcVYvVtWMy0+/OFpRsPspSoq1xe AcojEOMAypvmXFAdzhue7OKsgIaQOjQl+A+NYUVtgBMgF8vl2osi0r7r8qmwCVy8RE xl0/svgf5x1oFhCVYOsGorvTkqf2CBGL8kdYprjYpJXFTw0PW30yZIWLPfyV2G1bT3 RDpL8Zv/G3J5+lAplMqn461Zo5AFldRESTtLE6klLkyd1AQHtvX7RYLbyJ5PLKqyTX Bn/yDuPQkEJclpJ1WZAlDnyhX5l2kE9IohZO0Ev3DobJ4OMDpGLFNLPlbSlMHM1fWT guxEopLCb6rDg== Date: Mon, 29 Jul 2024 19:41:36 -0700 Subject: [GIT PULL 05/23] xfsprogs: inode-related repair fixes From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458253.1455085.17011073206641235117.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 7e74984e652fab200bc7319d7c3d90f6ae36be2e: xfs_{db,repair}: add an explicit owner field to xfs_da_args (2024-07-29 17:01:06 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/inode-repair-improvements-6.10_2024-07-29 for you to fetch changes up to ebf05a446c09336c08865dc29a6332be6ff8223c: mkfs/repair: pin inodes that would otherwise overflow link count (2024-07-29 17:01:06 -0700) ---------------------------------------------------------------- xfsprogs: inode-related repair fixes [v30.9 05/28] While doing QA of the online fsck code, I made a few observations: First, nobody was checking that the di_onlink field is actually zero; Second, that allocating a temporary file for repairs can fail (and thus bring down the entire fs) if the inode cluster is corrupt; and Third, that file link counts do not pin at ~0U to prevent integer overflows. This scattered patchset fixes those three problems. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (2): libxfs: port the bumplink function from the kernel mkfs/repair: pin inodes that would otherwise overflow link count include/xfs_inode.h | 2 ++ libxfs/util.c | 18 ++++++++++++++++++ mkfs/proto.c | 4 ++-- repair/incore_ino.c | 14 +++++++++----- repair/phase6.c | 10 +++++----- 5 files changed, 36 insertions(+), 12 deletions(-) From patchwork Tue Jul 30 02:41:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746448 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 032116EB5B for ; Tue, 30 Jul 2024 02:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307313; cv=none; b=F/8w5lOywPsG3VK8MH33BUgxdXJY7C0bV7LaEgpa1ERK5XirAMInJWZj00Jmrq4WmiJf9tWHdpNSlKiHmoJ0uT7CWGGu+fhlA97m03T49mmw6xmVfZvnZZiNsuJq7iNPXbJbty/0VWzJmJCrP95xNL3TRVBEHQ9qegLhwzoywjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307313; c=relaxed/simple; bh=MYpP2p0Eu09EU7VNiIqSAc6Oqh9MCcfrObRu1Lxqcz8=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=VHs40syAHv8ofEaze0oyUZYotoMFR0KEfTQk0tTVwhC8DOCcPVWKz8CnxJq4OtWtmilq5fDUomU6teLPlKZEGvSEM7MyRW7SheSp4Ghg8K/N/KMKGDVuAQpyamQ2NQxas0T8WpYfYPRXp9gjhIOO2SfTaivcVZabKbru/oDRuOY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L9GK6qRJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L9GK6qRJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7828BC32786; Tue, 30 Jul 2024 02:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307312; bh=MYpP2p0Eu09EU7VNiIqSAc6Oqh9MCcfrObRu1Lxqcz8=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=L9GK6qRJGWlgB0D2xEG6teDgk1ntBbZ7G74N+xbtdkDgdGiGj6BAOEzhvT0rKqP8P kfWjDdsv1LpiV4dB6PX51Trr8XLW0RarhtMWRd91bjQf4sQW0cerQ8YwmFxglrErQC a9BP9T4p9cRMQuKDmuTJjqQH6qmZCCN5VIzG3dj8WEGK+eeCyBpGpOuZx3BwMNUisW vb2uBn1tJLzsDcqI2uJ7AVBIjq2i7p4J26O4v4mzLoUEbp7aeZ8izugditB3oaouPf t75xjX6vWuN7TqDxuROlA+/7wSElEmMWfa/ia3OMhsHc7b6Pfz8MQZzHVXHoywZ2Gt I56A0gj5syPCg== Date: Mon, 29 Jul 2024 19:41:51 -0700 Subject: [GIT PULL 06/23] xfs_scrub: fixes to the repair code From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458353.1455085.9566516777477890945.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit ebf05a446c09336c08865dc29a6332be6ff8223c: mkfs/repair: pin inodes that would otherwise overflow link count (2024-07-29 17:01:06 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-repair-fixes-6.10_2024-07-29 for you to fetch changes up to 4b959abc5f353123775973cd98c94d819cc9de79: xfs_scrub: actually try to fix summary counters ahead of repairs (2024-07-29 17:01:06 -0700) ---------------------------------------------------------------- xfs_scrub: fixes to the repair code [v30.9 06/28] Now that we've landed the new kernel code, it's time to reorganize the xfs_scrub code that handles repairs. Clean up various naming warts and misleading error messages. Move the repair code to scrub/repair.c as the first step. Then, fix various issues in the repair code before we start reorganizing things. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (5): xfs_scrub: remove ALP_* flags namespace xfs_scrub: move repair functions to repair.c xfs_scrub: log when a repair was unnecessary xfs_scrub: require primary superblock repairs to complete before proceeding xfs_scrub: actually try to fix summary counters ahead of repairs scrub/phase1.c | 2 +- scrub/phase2.c | 3 +- scrub/phase3.c | 2 +- scrub/phase4.c | 22 ++++-- scrub/phase5.c | 2 +- scrub/phase7.c | 2 +- scrub/repair.c | 177 ++++++++++++++++++++++++++++++++++++++++++- scrub/repair.h | 16 +++- scrub/scrub.c | 204 +------------------------------------------------- scrub/scrub.h | 16 +--- scrub/scrub_private.h | 55 ++++++++++++++ 11 files changed, 269 insertions(+), 232 deletions(-) create mode 100644 scrub/scrub_private.h From patchwork Tue Jul 30 02:42:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746449 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9390B84D34 for ; Tue, 30 Jul 2024 02:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307328; cv=none; b=tu8AEVJ6eQEzizGcJbW3Rrex55RHrFrDQum5lK3FowVkDff5O13JiT626FmQiE3bFnu55VLK16dV/7TCfKQYYZ4drze8OWCVmoPwH6SfbkFvddDbpl+dSzY2PLKvaExe4vmoklyATXelUExEXLdSI87oZE6YEjqYx1174P2V0hk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307328; c=relaxed/simple; bh=0e35jiKGjujQhA3uP9q1N9FwK3Mb5YXH00SbkBvJlns=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=MQnrX78LVW25F0P+weztaMGfyrQJkclzvCx15BIRJnxxf9oJBnS7Q3/YrMRrbFuo8zUKDfoUifkfPzo6HAnu24MBbfHCie0aH4AtE6yk1un2ckFO7bX0aNtG0LWeke5jBqYTrdnLyGumLUvAF2j2ERNYvKKcLA3yddzb/tejm/Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C+L+780h; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C+L+780h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2817DC32786; Tue, 30 Jul 2024 02:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307328; bh=0e35jiKGjujQhA3uP9q1N9FwK3Mb5YXH00SbkBvJlns=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=C+L+780hAhtz4ezN74hHlRjF1zd4RwHCSXEOb+hQlusnj/E+w1pJmxL0E+r+Fq0EN yvmYoKyFGD6CtVyfrLogCytBtEaI2xurxgrhqQQomaMcU+QYwF/6T4IldTP++47Nbm uwSvnlTR6N1OsIFhHOn5HAVePsOpnQwR+EWtmTnt9VZUEmMFPmRjmnRMt8GOfzli4v mJA5yxiKyzPV+VYvWqjUQZ1chozwrjBKjX2JhZnFweqaTr/9Xb805kzALsS1pwBTJD 8/KwDmyJTiylKlBf9ial2ijHAOCcWoGm+Gd6JUdjrCwWOXzTL5fEw0G/vCncUL8B0k a2DuNbQfYZ4ow== Date: Mon, 29 Jul 2024 19:42:07 -0700 Subject: [GIT PULL 07/23] xfs_scrub: improve warnings about difficult repairs From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458454.1455085.8671992039573793867.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 4b959abc5f353123775973cd98c94d819cc9de79: xfs_scrub: actually try to fix summary counters ahead of repairs (2024-07-29 17:01:06 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-better-repair-warnings-6.10_2024-07-29 for you to fetch changes up to bf15d7766e3dd63eda56f6b2f7976e529cd07575: xfs_scrub: enable users to bump information messages to warnings (2024-07-29 17:01:07 -0700) ---------------------------------------------------------------- xfs_scrub: improve warnings about difficult repairs [v30.9 07/28] While I was poking through the QA results for xfs_scrub, I noticed that it doesn't warn the user when the primary and secondary realtime metadata are so out of whack that the chances of a successful repair are not so high. I decided that it was worth refactoring the scrub code a bit so that we could warn the user about these types of things, and ended up refactoring unnecessary helpers out of existence and fixing other reporting gaps. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (8): xfs_scrub: fix missing scrub coverage for broken inodes xfs_scrub: collapse trivial superblock scrub helpers xfs_scrub: get rid of trivial fs metadata scanner helpers xfs_scrub: split up the mustfix repairs and difficulty assessment functions xfs_scrub: add missing repair types to the mustfix and difficulty assessment xfs_scrub: any inconsistency in metadata should trigger difficulty warnings xfs_scrub: warn about difficult repairs to rt and quota metadata xfs_scrub: enable users to bump information messages to warnings man/man8/xfs_scrub.8 | 19 +++++++++++++++++++ scrub/common.c | 2 ++ scrub/phase1.c | 2 +- scrub/phase2.c | 53 ++++++++++++++++++++++++++++++++-------------------- scrub/phase3.c | 21 +++++++++++++++++---- scrub/phase4.c | 9 +++++---- scrub/phase5.c | 15 +++++++-------- scrub/repair.c | 47 +++++++++++++++++++++++++++++++++++----------- scrub/repair.h | 10 +++++++--- scrub/scrub.c | 52 +-------------------------------------------------- scrub/scrub.h | 7 ++----- scrub/xfs_scrub.c | 45 +++++++++++++++++++++++++++++++++++++++++++- scrub/xfs_scrub.h | 1 + 13 files changed, 175 insertions(+), 108 deletions(-) From patchwork Tue Jul 30 02:42:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746450 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 348CF12E1C2 for ; Tue, 30 Jul 2024 02:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307344; cv=none; b=QgTgqiZDcsX1CW1sQ7LLaQBBBTbNy+TA9I9XKgxWpBIBicPOpktCuYh1/6EMQG322cdmdMLoKKnQkPJ5Oj79ZTukiPfpVjWiCOmd+LSEthP1LINRAtU7zEzyOa5Fdo3RexnyESIy4EHFn5/AFSQEAqWW/Ze/pMx5gRxWR7g/Z8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307344; c=relaxed/simple; bh=J8++nZCZAtlXU7XGfEOTqMX+bs2WJK0J3XmlbAMHYAE=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=A7oWxBWZ2ZWLnQtfQagsS8CY4TFaIbmFyk/tEoYxlVPbSSIJLnvNR/b2XOH2QtTVIv3HjESgb4+UBTcvNO/F14z6M9XtGOdpz1ji6zeDPrseOKkLhuLbSGFDSy7eLeMR0sUEf9uOiDIsuhRQvLXgeC35u+eOTs6Ti5ec8MEJoLc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TPmNlVoL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TPmNlVoL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC80BC32786; Tue, 30 Jul 2024 02:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307343; bh=J8++nZCZAtlXU7XGfEOTqMX+bs2WJK0J3XmlbAMHYAE=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=TPmNlVoLu0kNtlIMyKzpa7ZDxpvTwDk9EB+EBnwM15v48GnWR5jjHkU324YhRBoUz adRfRRYFdOhgYFYvcGB0lVoQYYhJ1vJrtaW7qHc1MhWdyBD399nVhoKQoHxxVXhVJw fkJwcYI91XpiK6peoZ8fJBVnLKlsQy2khS8azD+f4gJSMofzesUuBbBENJDcqNljBa PJL85YVLczA0UKAw1pYR3+pIYoRdwj9QULH0S0ZP7LWWJEdAeXiz0hXmwiYBpJHcnM KYPRQQBqaDhaNYnLaN0rG6/wmp+jI6PCwnlmx24Axa3gQM8q4KQh5d1yZp8d+WuQ/D sehTAURSD4SLA== Date: Mon, 29 Jul 2024 19:42:23 -0700 Subject: [GIT PULL 08/23] xfs_scrub: track data dependencies for repairs From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458555.1455085.3083483586761912777.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit bf15d7766e3dd63eda56f6b2f7976e529cd07575: xfs_scrub: enable users to bump information messages to warnings (2024-07-29 17:01:07 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-repair-data-deps-6.10_2024-07-29 for you to fetch changes up to 81bfd0ad04a58892e2c153a22c361e7ff959f3fd: xfs_scrub: remove unused action_list fields (2024-07-29 17:01:07 -0700) ---------------------------------------------------------------- xfs_scrub: track data dependencies for repairs [v30.9 08/28] Certain kinds of XFS metadata depend on the correctness of lower level metadata. For example, directory indexes depends on the directory data fork, which in turn depend on the directory inode to be correct. The current scrub code does not strictly preserve these dependencies if it has to defer a repair until phase 4, because phase 4 prioritizes repairs by type (corruption, then cross referencing, and then preening) and loses the ordering of in the previous phases. This leads to absurd things like trying to repair a directory before repairing its corrupted fork, which is absurd. To solve this problem, introduce a repair ticket structure to track all the repairs pending for a principal object (inode, AG, etc). This reduces memory requirements if an object requires more than one type of repair and makes it very easy to track the data dependencies between sub-objects of a principal object. Repair dependencies between object types (e.g. bnobt before inodes) must still be encoded statically into phase 4. A secondary benefit of this new ticket structure is that we can decide to attempt a repair of an object A that was flagged for a cross referencing error during the scan if a different object B depends on A but only B showed definitive signs of corruption. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (9): xfs_scrub: track repair items by principal, not by individual repairs xfs_scrub: use repair_item to direct repair activities xfs_scrub: remove action lists from phaseX code xfs_scrub: remove scrub_metadata_file xfs_scrub: boost the repair priority of dependencies of damaged items xfs_scrub: clean up repair_item_difficulty a little xfs_scrub: check dependencies of a scrub type before repairing xfs_scrub: retry incomplete repairs xfs_scrub: remove unused action_list fields libfrog/scrub.c | 1 + scrub/phase1.c | 9 +- scrub/phase2.c | 46 +++-- scrub/phase3.c | 77 ++++---- scrub/phase4.c | 17 +- scrub/phase5.c | 9 +- scrub/phase7.c | 9 +- scrub/repair.c | 530 ++++++++++++++++++++++++++++++++++---------------- scrub/repair.h | 47 +++-- scrub/scrub.c | 136 ++++++------- scrub/scrub.h | 108 ++++++++-- scrub/scrub_private.h | 37 ++++ 12 files changed, 664 insertions(+), 362 deletions(-) From patchwork Tue Jul 30 02:42:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746451 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2F3613B780 for ; Tue, 30 Jul 2024 02:42:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307359; cv=none; b=HuBasQdsYsaz6AIgZpG79+EH8CBjgO5yZFaTtoUqA1+xqHIsg8tKbkBzJTC2Z4mOhgkR9KplrWWOqRlse5lyUkOcBo2A/WXvhwKvfKkQ9Jntgw2YNAirY5sfV3/LDcjX6gzKs1nGva4gK7SFR+myN62cRu2Z5P+jwQzl2yiy7Vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307359; c=relaxed/simple; bh=wMSg2YuqAkkmBiJT2JMt5JUWcYHBYn/z6/vgSBVeioo=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=tsF29BbFiQH8pSgcfMJ41bbmcEK2UqsTUM8Xa8UePHfUbPy64Q3UlVeNO63IEmJIa2KZ+/CqHW6b9a9y5prnkwQGNacgjdBMVgo4mUhAxU7VINsv40MBHDjtGDCDIhc/ZXRc0TnYjykF4q/7AHq+10i2jfuxJ40G411risXy4GY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VvvL0NUa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VvvL0NUa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61CA0C4AF0A; Tue, 30 Jul 2024 02:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307359; bh=wMSg2YuqAkkmBiJT2JMt5JUWcYHBYn/z6/vgSBVeioo=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=VvvL0NUakoVXQH4apZWdGIo/HbD0omXvR1j/y0l2DDjip3in7bAWkpkx9UPFcjZ3b r6fsmX2g43nZsYKwzO8KxUOUamjiJdWM4F4GsZp7SiHglsay/ck0wpodVr/cXE4CWy vZHof7FD+yGqZT0DFdeMI5qAJ1Idz6nDx/1h67gRS3AnELAbBF8h6sS7PO9S6IQE/F 0X18mpnoi34oBHz7ljM/3aB8f6RJhcBmqI487Hq4vxMo10lCk5MYwY+500ycAbOhc0 X1ZQAu5sJn6QnUEa9mAxw1yqi9YGr7A7crdUno264q8Bli7ZlKuk0k8ZRvArqjuog5 rt0LcLtfWxfmw== Date: Mon, 29 Jul 2024 19:42:38 -0700 Subject: [GIT PULL 09/23] xfs_scrub: use scrub_item to track check progress From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458655.1455085.7997777511946339540.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 81bfd0ad04a58892e2c153a22c361e7ff959f3fd: xfs_scrub: remove unused action_list fields (2024-07-29 17:01:07 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-object-tracking-6.10_2024-07-29 for you to fetch changes up to 8dd67c8eccbe0e6b8dd7975ba53f9ccaf532aa9c: xfs_scrub: hoist scrub retry loop to scrub_item_check_file (2024-07-29 17:01:08 -0700) ---------------------------------------------------------------- xfs_scrub: use scrub_item to track check progress [v30.9 09/28] Now that we've introduced tickets to track the status of repairs to a specific principal XFS object (fs, ag, file), use them to track the scrub state of those same objects. Ultimately, we want to make it easy to introduce vectorized repair, where we send a batch of repair requests to the kernel instead of making millions of ioctl calls. For now, however, we'll settle for easier bookkeepping. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (5): xfs_scrub: start tracking scrub state in scrub_item xfs_scrub: remove enum check_outcome xfs_scrub: refactor scrub_meta_type out of existence xfs_scrub: hoist repair retry loop to repair_item_class xfs_scrub: hoist scrub retry loop to scrub_item_check_file scrub/phase1.c | 3 +- scrub/phase2.c | 12 +- scrub/phase3.c | 41 ++----- scrub/phase4.c | 16 ++- scrub/phase5.c | 5 +- scrub/phase7.c | 5 +- scrub/repair.c | 71 ++++++----- scrub/scrub.c | 321 +++++++++++++++++++++++--------------------------- scrub/scrub.h | 40 +++++-- scrub/scrub_private.h | 14 +++ 10 files changed, 257 insertions(+), 271 deletions(-) From patchwork Tue Jul 30 02:42:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746452 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 379B0144312 for ; Tue, 30 Jul 2024 02:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307375; cv=none; b=q9nZjLz4CD/rA7CbWjL9I/k69tFY6m/mYYa0TeIznmhgM5MX8Lx600HlZdVsXQDNfJr5whUbeSLdJq/ImpkspD6JH6N/1MBw32CfGZddIO/pSfVNW3krHeYkn+McOZiib+gwHbntpE+hYuDDefEX9dS8e60aBlt757zxYDRiXSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307375; c=relaxed/simple; bh=5v/Z6no3e3dykoIL6rxtC4dvw+zZ0s+MsCenOQJEjSY=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=NqmpaXYdVJuCOFQIaR8c8YWx5icTHrXhhBeSUqXqLeaEvkEE8uz6JzNWfF1XJvpUHHfWmeRoIZalKrT2R0oem5eWHWx2d9vlKABK+OcQ3g/5SRdSE3VWcwSnRM3EGLktnzXsDVefMgTkSNA+ay/xVO8Ec9VYbvpgXOab8Sp7h+A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R8Z1yStr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R8Z1yStr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FFC3C32786; Tue, 30 Jul 2024 02:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307375; bh=5v/Z6no3e3dykoIL6rxtC4dvw+zZ0s+MsCenOQJEjSY=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=R8Z1yStrrGQPT2gN5ZP9iUX2uwaVI6cScqB1bX3kXuL5tJbkB8MTpg1i6hnrwoAtE UHT6Jc9QptPEQRbk8LOLb3SWUNQRh27dY6EA+cYO746fkiW2A2TDsTBVXngn+HYIMF zzmmJRajSK89+kcJ1yiPDa/lSn+CHEktZ0DxtBK46Es2WoiUuETB7WsRq7Lt3hsQpa Imo0c1e2ywt14Q3zev/I+q2wipMuChnt1IidsH4nz9unOqwVqybFbUiGMRDPzm7WIt y4/2B4Jzq0UUdoY1TM0wD2iz/YhySzhHaxgxzlFMVDYhDdY5uIYBydXAw2R/a/s8xl DZGH4AwpHC7+Q== Date: Mon, 29 Jul 2024 19:42:54 -0700 Subject: [GIT PULL 10/23] xfs_scrub: improve scheduling of repair items From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458756.1455085.11655778070760827192.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 8dd67c8eccbe0e6b8dd7975ba53f9ccaf532aa9c: xfs_scrub: hoist scrub retry loop to scrub_item_check_file (2024-07-29 17:01:08 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-repair-scheduling-6.10_2024-07-29 for you to fetch changes up to 474ff27d466c053f1cd51024e6b0c5a741a2d4bd: xfs_scrub: try to repair space metadata before file metadata (2024-07-29 17:01:08 -0700) ---------------------------------------------------------------- xfs_scrub: improve scheduling of repair items [v30.9 10/28] Currently, phase 4 of xfs_scrub uses per-AG repair item lists to schedule repair work across a thread pool. This scheme is suboptimal when most of the repairs involve a single AG because all the work gets dumped on a single pool thread. Instead, we should create a thread pool with the same number of workers as CPUs, and dispatch individual repair tickets as separate work items to maximize parallelization. However, we also need to ensure that repairs to space metadata and file metadata are kept in separate queues because file repairs generally depend on correctness of space metadata. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (4): libfrog: enhance ptvar to support initializer functions xfs_scrub: improve thread scheduling repair items during phase 4 xfs_scrub: recheck entire metadata objects after corruption repairs xfs_scrub: try to repair space metadata before file metadata libfrog/ptvar.c | 9 +- libfrog/ptvar.h | 4 +- scrub/counter.c | 2 +- scrub/descr.c | 2 +- scrub/phase1.c | 15 +++- scrub/phase2.c | 23 ++++- scrub/phase3.c | 106 ++++++++++++++-------- scrub/phase4.c | 244 +++++++++++++++++++++++++++++++++++++------------- scrub/phase7.c | 2 +- scrub/read_verify.c | 2 +- scrub/repair.c | 172 ++++++++++++++++++++++------------- scrub/repair.h | 37 ++++++-- scrub/scrub.c | 5 +- scrub/scrub.h | 10 +++ scrub/scrub_private.h | 2 + scrub/xfs_scrub.h | 3 +- 16 files changed, 455 insertions(+), 183 deletions(-) From patchwork Tue Jul 30 02:43:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746453 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4182E145B35 for ; Tue, 30 Jul 2024 02:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307391; cv=none; b=Tx6dYUfNvMpC6phYcM1te4bkBuNNpbZsZjWqvEXsAsIjbLxXt03ms2l0HqRCsienKcFRWucOC9+XSWebdOdW5b+TfHghJEWqljX3j1NOpuzvBml4GF1Yye7HmhlvAN4Zq03Ctqc3JQ7lKlXFfZErcyEZhPnrFa5nPRb8BL/NUOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307391; c=relaxed/simple; bh=b09U4kGt90aHGUPv4AKsmJ2qQwaBviUXcXmiY6DoWsg=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=o82D/ZP3dPgOPIXVeQEiwZ5TrzgxZndkWG+Yo3Hjg8E+oFeeRPph0+87y6i6mgjMYSlc2qtFZ6uNcqrjt7kjDkwM26o16zSEH6S/AozeDurf2fi/dDCHiBCHdIEuGJmISLjKw//UITN3c7TPGgGx29zTLj/My0SMSWF9YUOgczQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H7c7NHNS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H7c7NHNS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B225FC32786; Tue, 30 Jul 2024 02:43:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307390; bh=b09U4kGt90aHGUPv4AKsmJ2qQwaBviUXcXmiY6DoWsg=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=H7c7NHNS5Bj5bFCWEP2av2HYWgohGfrl+qiHQtatIjVAjczXRoAkOqbJ/Q3cDn81l A6reGS3vCMEPV08QEBBxtN9tlpzV8Poz/fcHhmLOKcSgu5nLw2sIRxDa8Dv9QUVzsv Kg0JdqATJFjTj3N7SUIwAZcoyEY5C8tOuxIE0bbMDa0wesqZgeqw73eMuMOzlFtIHt 0himaMzsK32v6OUrpnDKMGSN1DAi/wW10Vj3qXKIYy1b1o7rcxAVhNb0Dss2wH5I8b oKy0NnsRJPnAsk/bUJrS8S3sv/SkulvVwtbks9JYcwch4km3MP6AKsnzS8/AvB9Lgc 0J+HcbRrnxVqQ== Date: Mon, 29 Jul 2024 19:43:10 -0700 Subject: [GIT PULL 11/23] xfs_scrub: detect deceptive filename extensions From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458858.1455085.1385987165268927699.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 474ff27d466c053f1cd51024e6b0c5a741a2d4bd: xfs_scrub: try to repair space metadata before file metadata (2024-07-29 17:01:08 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-detect-deceptive-extensions-6.10_2024-07-29 for you to fetch changes up to 746ee95b71649b4ae515893ffa3bbe7b5e815d0d: xfs_scrub: dump unicode points (2024-07-29 17:01:09 -0700) ---------------------------------------------------------------- xfs_scrub: detect deceptive filename extensions [v30.9 11/28] In early 2023, malware researchers disclosed a phishing attack that was targeted at people running Linux workstations. The attack vector involved the use of filenames containing what looked like a file extension but instead contained a lookalike for the full stop (".") and a common extension ("pdf"). Enhance xfs_scrub phase 5 to detect these types of attacks and warn the system administrator. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (13): xfs_scrub: use proper UChar string iterators xfs_scrub: hoist code that removes ignorable characters xfs_scrub: add a couple of omitted invisible code points xfs_scrub: avoid potential UAF after freeing a duplicate name entry xfs_scrub: guard against libicu returning negative buffer lengths xfs_scrub: hoist non-rendering character predicate xfs_scrub: store bad flags with the name entry xfs_scrub: rename UNICRASH_ZERO_WIDTH to UNICRASH_INVISIBLE xfs_scrub: type-coerce the UNICRASH_* flags xfs_scrub: reduce size of struct name_entry xfs_scrub: rename struct unicrash.normalizer xfs_scrub: report deceptive file extensions xfs_scrub: dump unicode points scrub/unicrash.c | 532 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 426 insertions(+), 106 deletions(-) From patchwork Tue Jul 30 02:43:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746454 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9221146588 for ; Tue, 30 Jul 2024 02:43:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307406; cv=none; b=VRaqwAsIZPv1kNBfYP8H2iTcjDVqi6GqE0XUH1LVnd+UJsIIaw97H/xXZ3f6lA62F8zR+fzFk59ChfI68JyHlYO63b45VYArLWbfb7XiiSzZTVx5UDX6zJqKwSCc67bncbt5gXbOxr4nhD5Q4OAQ/r2SImnNQeRLRf+aeEaUVM0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307406; c=relaxed/simple; bh=DkcBSKkMVUqGzcAtIzsZiAgW8di4LWJx0Gnjs0LUimI=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=rsggPxeikgUsZwZ7QwXCl7DLvfVTxPESTpwvziPuhcDchtf4v9z/9UNRXb6DEiLaNyyEvmwm1QPAvbB8m9x8VcH4G0QtoijDR1GJB9u9/G9jLkUQJ3InIk4eERW/N0s1tm7ntp3dWBNRYTAtUKoLxvXzNFjbE639dpLx152a1EQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YCs3CxXn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YCs3CxXn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FC3CC32786; Tue, 30 Jul 2024 02:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307406; bh=DkcBSKkMVUqGzcAtIzsZiAgW8di4LWJx0Gnjs0LUimI=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=YCs3CxXnPR61D36ulQz9Rz6AOLlopeOyz8Fhao6OLYCyWnVsz70LxMd/bhupwZn9m xciyvcf9jm8v6yj6q8+hwJBCXHRdEoFzUfJxnrtMNRdZgB43YGslE0XldMf35jQWtX VB76y+4d2/IUek3du5EclILVEi8JUKXXrAY/SJ3Lv1aFtBoydgAe22WIgC40qurG+x 7Fez2a5W6XPkYdWYRf4wMEz6AZgZCpGGffwMJimHFEJXhHNPt3qApaTbVsNmqIGSkR V6DATL/J0bq31UL8CwJwhpCht/HD7br1h0O6s5xDa/XK5NVGUckHA1lta5/wH9+ewv +/EGSmbBY7XBA== Date: Mon, 29 Jul 2024 19:43:25 -0700 Subject: [GIT PULL 12/23] xfs_scrub: move fstrim to a separate phase From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230458966.1455085.4399793624957809063.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 746ee95b71649b4ae515893ffa3bbe7b5e815d0d: xfs_scrub: dump unicode points (2024-07-29 17:01:09 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-fstrim-phase-6.10_2024-07-29 for you to fetch changes up to 5ccdd24dc9987b50333332b7381ff1a305e67ef7: xfs_scrub: improve responsiveness while trimming the filesystem (2024-07-29 17:01:09 -0700) ---------------------------------------------------------------- xfs_scrub: move fstrim to a separate phase [v30.9 12/28] Back when I originally designed xfs_scrub, all filesystem metadata checks were complete by the end of phase 3, and phase 4 was where all the metadata repairs occurred. On the grounds that the filesystem should be fully consistent by then, I made a call to FITRIM at the end of phase 4 to discard empty space in the filesystem. Unfortunately, that's no longer the case -- summary counters, link counts, and quota counters are not checked until phase 7. It's not safe to instruct the storage to unmap "empty" areas if we don't know where those empty areas are, so we need to create a phase 8 to trim the fs. While we're at it, make it more obvious that fstrim only gets to run if there are no unfixed corruptions and no other runtime errors have occurred. Finally, reduce the latency impacts on the rest of the system by breaking up the fstrim work into a loop that targets only 16GB per call. This enables better progress reporting for interactive runs and cgroup based resource constraints for background runs. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (7): xfs_scrub: move FITRIM to phase 8 xfs_scrub: ignore phase 8 if the user disabled fstrim xfs_scrub: collapse trim_filesystem xfs_scrub: fix the work estimation for phase 8 xfs_scrub: report FITRIM errors properly xfs_scrub: don't call FITRIM after runtime errors xfs_scrub: improve responsiveness while trimming the filesystem scrub/Makefile | 1 + scrub/phase4.c | 30 ++--------- scrub/phase8.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ scrub/vfs.c | 22 +++++--- scrub/vfs.h | 2 +- scrub/xfs_scrub.c | 11 +++- scrub/xfs_scrub.h | 3 ++ 7 files changed, 183 insertions(+), 37 deletions(-) create mode 100644 scrub/phase8.c From patchwork Tue Jul 30 02:43:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746455 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C86C146588 for ; Tue, 30 Jul 2024 02:43:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307422; cv=none; b=F0s/SOd+sVBYW89nBqdrDMoJP8sMix0+fqkuJrLvnt3i8LBIIa9G8yFNNSApG8DqlmFFTkJtMkn5waTDQGJoyZ1NQR76h+ewQeBGldAb0pjJVtnH8x8obp7wjSUPYK7hK9+RyCeTEqML3Zt0viRtBUN6d2S9PmI9LdRkkqhB2AU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307422; c=relaxed/simple; bh=cH+8GrP6Pa8i9ssvFnLbYQQ+lZXAzzZ2O7E0iMKiFSg=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=N4WO+Ngyq/MgOb1NqgE0WV3nItvE08y0RlXI5UQWD938I2uUsoBDNxr4rH6ib6LDzBOHAevYZDGbCwo708phBHPt3VGjL9ZaklzBrgYpu0FqXyNlz3p2e/7QQoJgaYFSvW0yY5FNHq6H9dT16GKzoZrA82Q5Pn+QDXmsV8CO8nw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GorZz2QT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GorZz2QT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14B7CC32786; Tue, 30 Jul 2024 02:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307422; bh=cH+8GrP6Pa8i9ssvFnLbYQQ+lZXAzzZ2O7E0iMKiFSg=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=GorZz2QTbFdRqniUTmqEMUqWUsUWRN3fPVBeismJMCjLeOEnkQGfULttRv0PulEHD oP4cqeHQuqfzP5hT9b1/Fo4+FlbfKo9Js81a//iCxIOHTWXSPN4dZCAg3hM5gFBEwk 4RO1Pea5BqSR1IreKaJoNJT46FbJvsFpePPIK8IjzEUgrwCtYNtpDAU/sVt3Cb5Dtm tfTZwk6M2AGTRB+AXaLDNG/LJj9NlaCUYGb/u6KBhTagb+kRy5XHpFsnrt45iw6J4/ RE44SR2gUaCYqL1rMWQGH1aFUoB2m/693d/CuHfTJe5IeAf+Eg4HMwgTyo+bDWCG9j mxwY9kSHGD4pQ== Date: Mon, 29 Jul 2024 19:43:41 -0700 Subject: [GIT PULL 13/23] xfs_scrub: use free space histograms to reduce fstrim runtime From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459074.1455085.705786233665014114.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 5ccdd24dc9987b50333332b7381ff1a305e67ef7: xfs_scrub: improve responsiveness while trimming the filesystem (2024-07-29 17:01:09 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-fstrim-minlen-freesp-histogram-6.10_2024-07-29 for you to fetch changes up to 34bed605490f936c3ead49e2e1cad78505260461: xfs_scrub: tune fstrim minlen parameter based on free space histograms (2024-07-29 17:01:09 -0700) ---------------------------------------------------------------- xfs_scrub: use free space histograms to reduce fstrim runtime [v30.9 13/28] This patchset dramatically reduces the runtime of the FITRIM calls made during phase 8 of xfs_scrub. It turns out that phase 8 can really get bogged down if the free space contains a large number of very small extents. In these cases, the runtime can increase by an order of magnitude to free less than 1%% of the free space. This is not worth the time, since we're spending a lot of time to do very little work. The FITRIM ioctl allows us to specify a minimum extent length, so we can use statistical methods to compute a minlen parameter. It turns out xfs_db/spaceman already have the code needed to create histograms of free space extent lengths. We add the ability to compute a CDF of the extent lengths, which make it easy to pick a minimum length corresponding to 99%% of the free space. In most cases, this results in dramatic reductions in phase 8 runtime. Hence, move the histogram code to libfrog, and wire up xfs_scrub, since phase 7 already walks the fsmap. We also add a new -o suboption to xfs_scrub so that people who /do/ want to examine every free extent can do so. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (7): libfrog: hoist free space histogram code libfrog: print wider columns for free space histogram libfrog: print cdf of free space buckets xfs_scrub: don't close stdout when closing the progress bar xfs_scrub: remove pointless spacemap.c arguments xfs_scrub: collect free space histograms during phase 7 xfs_scrub: tune fstrim minlen parameter based on free space histograms db/freesp.c | 89 +++++------------ libfrog/Makefile | 2 + libfrog/histogram.c | 270 +++++++++++++++++++++++++++++++++++++++++++++++++++ libfrog/histogram.h | 77 +++++++++++++++ man/man8/xfs_scrub.8 | 16 +++ scrub/phase7.c | 47 ++++++++- scrub/phase8.c | 91 ++++++++++++++++- scrub/spacemap.c | 11 +-- scrub/vfs.c | 4 +- scrub/vfs.h | 2 +- scrub/xfs_scrub.c | 45 ++++++++- scrub/xfs_scrub.h | 16 +++ spaceman/freesp.c | 99 +++++++------------ 13 files changed, 619 insertions(+), 150 deletions(-) create mode 100644 libfrog/histogram.c create mode 100644 libfrog/histogram.h From patchwork Tue Jul 30 02:43:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746456 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B07ADF60 for ; Tue, 30 Jul 2024 02:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307438; cv=none; b=OlDe/OdA1GMPJRTx8/rZ4izYKqvamwTNMoVuVx1wo2RsgwCvEl/wIhmpluY2yLFrq69EXeExsUbodWIG5lrWmfqn2V9UXVSq1/PvaHAR4+MhID55memyAaioaVrOFTFVezI7hmOEmERthBcDL+lkUKLxXCpXDzRXh8Q/V3ThNZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307438; c=relaxed/simple; bh=mofFokamwyy867/TcVBxtmYY6R9Z7rO48GRURAF+DfQ=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=cDYvWde1cFF6KjaRNbe4ypMeafdpBx4sqIG8HpXHM9pAraSO0YIroFmZxlPPitNNQWuHoiBhZn0PqpOLzD83Bzi/uyX5Tc+9Gq+J946hMe7la5/EQty+p1iboBZqh05AsqrjU3bO3AaagLMxhvtpV34/FFbam2uz3loV85kyK5Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UrDPkMtO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UrDPkMtO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B493BC32786; Tue, 30 Jul 2024 02:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307437; bh=mofFokamwyy867/TcVBxtmYY6R9Z7rO48GRURAF+DfQ=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=UrDPkMtOJD6HzriyAEwr7OjXu6nmR79m1YD3519LqfzdxmEKR9lbsEPhFXImfqBt2 bRK8UBUvPS74ZMrnSuse8AVr3zNIlL+VHKS4hrP3g+5b4Ivi85iLrik2MDomwL3Q/X GJk/1MLT7mQohH3/KZdMMbJYIG49lrfkApTdzp8DLiVLNBc4FO9YHkeaqFvimswuTx zoKruUXJToQjE7Qwcf8yeigkP6lgN2YAJLz2IJCuBZPCbg/WTQ/w6QWZez1z39oSfO IhJ4cfG3FX45sZ4VkuZQgRIKYDmFr9qO1t/uzfdE6VxZNm5GNtd86A6RDxOwAD6tXV GIwkxHp33/8wA== Date: Mon, 29 Jul 2024 19:43:57 -0700 Subject: [GIT PULL 14/23] xfs_scrub: tighten security of systemd services From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: glitsj16@riseup.net, hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459183.1455085.8900166042263013711.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 34bed605490f936c3ead49e2e1cad78505260461: xfs_scrub: tune fstrim minlen parameter based on free space histograms (2024-07-29 17:01:09 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-service-security-6.10_2024-07-29 for you to fetch changes up to 50411335572120153cc84d54213cd5ca9dd11b14: xfs_scrub_all: tighten up the security on the background systemd service (2024-07-29 17:01:10 -0700) ---------------------------------------------------------------- xfs_scrub: tighten security of systemd services [v30.9 14/28] To reduce the risk of the online fsck service suffering some sort of catastrophic breach that results in attackers reconfiguring the running system, I embarked on a security audit of the systemd service files. The result should be that all elements of the background service (individual scrub jobs, the scrub_all initiator, and the failure reporting) run with as few privileges and within as strong of a sandbox as possible. Granted, this does nothing about the potential for the /kernel/ screwing up, but at least we could prevent obvious container escapes. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (6): xfs_scrub: allow auxiliary pathnames for sandboxing xfs_scrub.service: reduce background CPU usage to less than one core if possible xfs_scrub: use dynamic users when running as a systemd service xfs_scrub: tighten up the security on the background systemd service xfs_scrub_fail: tighten up the security on the background systemd service xfs_scrub_all: tighten up the security on the background systemd service man/man8/xfs_scrub.8 | 9 +++- scrub/Makefile | 7 ++- scrub/phase1.c | 4 +- scrub/system-xfs_scrub.slice | 30 +++++++++++++ scrub/vfs.c | 2 +- scrub/xfs_scrub.c | 11 +++-- scrub/xfs_scrub.h | 5 ++- scrub/xfs_scrub@.service.in | 97 +++++++++++++++++++++++++++++++++++----- scrub/xfs_scrub_all.service.in | 66 +++++++++++++++++++++++++++ scrub/xfs_scrub_fail@.service.in | 59 ++++++++++++++++++++++++ 10 files changed, 270 insertions(+), 20 deletions(-) create mode 100644 scrub/system-xfs_scrub.slice From patchwork Tue Jul 30 02:44:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746457 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFA30DF60 for ; Tue, 30 Jul 2024 02:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307454; cv=none; b=g7MNWlFETDNYSbsI1b++/9RRCoYhMmIpIw5KYvIgH8NLZA/+F5/b3f2YHEUPDq7dKKYOJEPhwR4LP8aUJOr6jqZDp0qlwKrD7fRnZT0xEEcBeAkXhpyuhkms5BzS+w4yx97Fov7o5hzAuVaoumfpxNEj3QqG0iYHThl1UqZ/i+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307454; c=relaxed/simple; bh=UtY+4tHFYrcYM+IjSPyYTA8KbB85Z5iUdRv/yk2fQgU=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=jYPX/je47WSPnn90UytK3Vdc1be+9QfnPIr1vI7MclPuvO/dT+ulUoUZbVhsFzn8GplLJiERBj0x5J7hdvpun6fdu82NAewNUaTGkotkU31Tk5DCocLb7+KuPSaf9aPBVLb1nn/ltz52UvAaiE1sKmjlj7D60xvsbBNUqIDizJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N9skAh1d; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N9skAh1d" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57050C32786; Tue, 30 Jul 2024 02:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307453; bh=UtY+4tHFYrcYM+IjSPyYTA8KbB85Z5iUdRv/yk2fQgU=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=N9skAh1d4+0S6SbBnLhkxyyLWkYhtTxxZm+WmQq2FmADg3Qf8RxbF8GJKwxyQOA5G ocdEzJsSuPgSdPbUaddTziq85x9oeSdtd9Tpyocae0FVmMWmpbL2agq6Bt9E8fRQCq 3xZ7+HvnDKdVzg7oFZSnKOXoWjWPL1sTalQsd5dD4nU9QInfeYbFuTORxrBkNZfKAX x4L7VN4Y73Sib3pPdYndlYJiWujpd6+q1yMbYA478engER1aiVugyXueVfXkiwPcNh zNv+yaBGXErd9tuADP+5W8rYJQwGqkWh/ZEnmN0WLRQ+5x+uDq6+LecPGu5Vz16ACm AFhOOnNvrlK6w== Date: Mon, 29 Jul 2024 19:44:12 -0700 Subject: [GIT PULL 15/23] xfs_scrub_all: automatic media scan service From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459290.1455085.13159985441266119133.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 50411335572120153cc84d54213cd5ca9dd11b14: xfs_scrub_all: tighten up the security on the background systemd service (2024-07-29 17:01:10 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-media-scan-service-6.10_2024-07-29 for you to fetch changes up to e040916f649f71fb6a695dfcc6f6c9f576c5c4db: xfs_scrub_all: failure reporting for the xfs_scrub_all job (2024-07-29 17:01:10 -0700) ---------------------------------------------------------------- xfs_scrub_all: automatic media scan service [v30.9 15/28] Now that we've completed the online fsck functionality, there are a few things that could be improved in the automatic service. Specifically, we would like to perform a more intensive metadata + media scan once per month, to give the user confidence that the filesystem isn't losing data silently. To accomplish this, enhance xfs_scrub_all to be able to trigger media scans. Next, add a duplicate set of system services that start the media scans automatically. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (6): xfs_scrub_all: only use the xfs_scrub@ systemd services in service mode xfs_scrub_all: remove journalctl background process xfs_scrub_all: support metadata+media scans of all filesystems xfs_scrub_all: enable periodic file data scrubs automatically xfs_scrub_all: trigger automatic media scans once per month xfs_scrub_all: failure reporting for the xfs_scrub_all job debian/rules | 3 +- include/builddefs.in | 3 + man/man8/Makefile | 7 +- man/man8/{xfs_scrub_all.8 => xfs_scrub_all.8.in} | 20 +++- scrub/Makefile | 21 +++- scrub/xfs_scrub@.service.in | 2 +- scrub/xfs_scrub_all.cron.in | 2 +- scrub/xfs_scrub_all.in | 126 ++++++++++++++++++----- scrub/xfs_scrub_all.service.in | 9 +- scrub/xfs_scrub_all_fail.service.in | 71 +++++++++++++ scrub/xfs_scrub_fail.in | 46 +++++++-- scrub/xfs_scrub_fail@.service.in | 2 +- scrub/xfs_scrub_media@.service.in | 100 ++++++++++++++++++ scrub/xfs_scrub_media_fail@.service.in | 76 ++++++++++++++ 14 files changed, 443 insertions(+), 45 deletions(-) rename man/man8/{xfs_scrub_all.8 => xfs_scrub_all.8.in} (59%) create mode 100644 scrub/xfs_scrub_all_fail.service.in create mode 100644 scrub/xfs_scrub_media@.service.in create mode 100644 scrub/xfs_scrub_media_fail@.service.in From patchwork Tue Jul 30 02:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746458 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8595FDF60 for ; Tue, 30 Jul 2024 02:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307469; cv=none; b=tl7rQsAN2xpntnt1XraZwuBJQElHhmUQr5duhmoQRwZkgJW08OBMocHXCJXTruGGjGWlBszxFS2FzOEQLirpvtB9OAFtdxDlsPdn1B6fiDzrbwQTdD9eukWWSX3i9vLpLqyAWMN03b3kxu4dOcNPwfpDVYqVtxDjPxvnq911oro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307469; c=relaxed/simple; bh=9T4m6SpeUJ7Ab4wEEbcSj1PZ6LNOpfOg0yn0MRKEW1w=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=SP/esfTSULkjdmatF57n4t91Y7o9huRHSNdSfz/IjyyfdkPh9CGm4g715nw5Fols/N/7BwsSPyj/RlQrZBGtfz7AqVNFTPn8cmf1uax//WG21kz5y0BALI5+VtIEZC+foNcT5ocnWrwNJWnF8c6Ste4slyFduO9dpktCFj2hs+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n206c0oj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n206c0oj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CDD3C32786; Tue, 30 Jul 2024 02:44:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307469; bh=9T4m6SpeUJ7Ab4wEEbcSj1PZ6LNOpfOg0yn0MRKEW1w=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=n206c0ojkLYtS2i81eUrxe3rL2jk4RSZxAiEmBoZT2cNoBWqMdI1oE/jt3Cq5K+de FxqcWhmIXfiBgh10niKFsQV/1rcdnHiXJlPpPsD6Iav0qXivu1sN9UAHDKbSdI/Zsr FWXajZjD7NO1q9DIpnxlKVwWx9DKNJaYFGqfw7Akv56N8m9r7yJQJ3KS3mwUO6s2MH t26Wbx35pGgIEP/L+cG1Ed8O6ae9eobqa0GnwHWnG5L6QewzG4HQxSciW97SecJG0g c4+19QG5ulB1cpLbAwNpVZmLLXdrYqz2JY91eoVUppclvUjhABUoe8qcPe5gFzb4jQ f2K47z71M4kcQ== Date: Mon, 29 Jul 2024 19:44:28 -0700 Subject: [GIT PULL 16/23] xfs_scrub_all: improve systemd handling From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459399.1455085.1767851933784509862.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit e040916f649f71fb6a695dfcc6f6c9f576c5c4db: xfs_scrub_all: failure reporting for the xfs_scrub_all job (2024-07-29 17:01:10 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-all-improve-systemd-handling-6.10_2024-07-29 for you to fetch changes up to e46249ec0b96ac5ced5b49928d3b3865b6d9546c: xfs_scrub_all: implement retry and backoff for dbus calls (2024-07-29 17:01:10 -0700) ---------------------------------------------------------------- xfs_scrub_all: improve systemd handling [v30.9 16/28] This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (5): xfs_scrub_all: encapsulate all the subprocess code in an object xfs_scrub_all: encapsulate all the systemctl code in an object xfs_scrub_all: add CLI option for easier debugging xfs_scrub_all: convert systemctl calls to dbus xfs_scrub_all: implement retry and backoff for dbus calls debian/control | 2 +- scrub/xfs_scrub_all.in | 284 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 213 insertions(+), 73 deletions(-) From patchwork Tue Jul 30 02:44:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746459 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B84E20326 for ; Tue, 30 Jul 2024 02:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307485; cv=none; b=UVjnlSjKM1IkTAOrm72CCbdRpC0bDD9XG9i4EWTq4/HZbY2EvvOAgzh92yEBkbRIKatp2c7jiXzd508UoIk73hfomIm8a/NK+KS0ircFZAq5xMqxqkGvc8d/plp4lDCGgDJ3ZuxXV6zlwu6h+h7c8e1QlMABhg+TfQVFFfdfDOQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307485; c=relaxed/simple; bh=xoUMfWCSGrsQi84DimIyJzoRfsumGWy7eWS1Os7meH4=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=PS/brusYZtN96F2rbYobfRAX1y8znyjHWvR/900yLfGrrlpGdW6t2UN2gXzy4qSjmKcbA31zp2VqZKeXwCkluFE1JHTdKWcgOC4qPUNUts1HnxIV+C8Q3sftc1F5+omXQ5IZBS2VBhjoIivx/5lc3goDxdNm7FgonOuieH+z+HQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NL4Puu8W; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NL4Puu8W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3D49C32786; Tue, 30 Jul 2024 02:44:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307484; bh=xoUMfWCSGrsQi84DimIyJzoRfsumGWy7eWS1Os7meH4=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=NL4Puu8WGLK7b3l85w3lqVRBInMqhxPv/tv0F8nK7UR6AKk8HO4jMokUC+0htXqz/ 1i8BXLHFJsuV+w+sDod1KHJiRT9h5ANN1DSg+aTgI3U5cqZYEZwdDQFyEiODj0aLYd G0aGLr+TSMSwno9VqgK+8rU5Q15RZdG5FuWcJcYWIf65RtLkFiqc4ezx7IOuN42/rB 5PwhyMgLiOaLSI/MWMs9Hq61w/yJYnBcMAZoIDBV4tb0PE7VmFzaguLUbuwskwK63K PQ+vsMHI7v0C+iOeH1OmJOw8xlluNwTBJsNMsF6rYpw1SBgy7KsgauAs/ffrn9Q63j 8ilVX0wGbCrKw== Date: Mon, 29 Jul 2024 19:44:44 -0700 Subject: [GIT PULL 17/23] xfsprogs: improve extended attribute validation From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: chandan.babu@oracle.com, david@fromorbit.com, hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459508.1455085.4400398103646272942.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit e46249ec0b96ac5ced5b49928d3b3865b6d9546c: xfs_scrub_all: implement retry and backoff for dbus calls (2024-07-29 17:01:10 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/improve-attr-validation-6.10_2024-07-29 for you to fetch changes up to 2823d8ed93da2bd3880abb52a58e91a920961e27: xfs_repair: check for unknown flags in attr entries (2024-07-29 17:01:11 -0700) ---------------------------------------------------------------- xfsprogs: improve extended attribute validation [v13.8 17/28] Prior to introducing parent pointer extended attributes, let's spend some time cleaning up the attr code and strengthening the validation that it performs on attrs coming in from the disk. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (6): xfs_scrub_all: fail fast on masked units xfs_scrub: automatic downgrades to dry-run mode in service mode xfs_scrub: add an optimization-only mode xfs_repair: check free space requirements before allowing upgrades xfs_repair: enforce one namespace bit per extended attribute xfs_repair: check for unknown flags in attr entries include/libxfs.h | 1 + libxfs/libxfs_api_defs.h | 1 + man/man8/xfs_scrub.8 | 6 ++- repair/attr_repair.c | 30 +++++++++++ repair/phase2.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++ scrub/Makefile | 2 +- scrub/phase1.c | 13 +++++ scrub/phase4.c | 6 +++ scrub/repair.c | 37 ++++++++++++- scrub/repair.h | 2 + scrub/scrub.c | 4 +- scrub/xfs_scrub.c | 21 +++++++- scrub/xfs_scrub.h | 1 + scrub/xfs_scrub_all.in | 21 ++++++++ 14 files changed, 272 insertions(+), 7 deletions(-) From patchwork Tue Jul 30 02:44:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746460 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B582DDF60 for ; Tue, 30 Jul 2024 02:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307500; cv=none; b=Wt3JGVls0Bmb1kpSAGLUsCzcUaG5YzXcx4jLihy4TRm0l3a56y5sRGHHpbhAwyAoYJCtAaEoeQ1Zxm2i99VIgAG5acAOL4OAbhyvPUDUOKDBofWIHSZ94iOms0RkCwA5JOGfz0H7FxKu+iyxR1HuKF5Zqk5jayaz5XFdyh+N7FA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307500; c=relaxed/simple; bh=trjwItPMM2KsZzBOy6w2DolJ6U/S7tUOvCbJtfZH234=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=hooRUJOiDJIRmlHa689TjoJhhUeN+5pdRX0N/XO3SOTgtj4Fh1wzrdpMRInVoB/Q7WZuSZ9c3UMGseW6U6F2rhqGX6ozFz+Y5vUij/r5/4sIYX0coDUutmpjZSKMf2n4b83mfq5iw5fnWPpsRxeYQeTqp3uuFCp9HqdQRTdFGf4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tv3F02Wz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tv3F02Wz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C9B2C32786; Tue, 30 Jul 2024 02:45:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307500; bh=trjwItPMM2KsZzBOy6w2DolJ6U/S7tUOvCbJtfZH234=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=tv3F02WzSbZbdhYJKw3YyvG1sffii9VsvMHWi1y2HvIhFEkTKTRylQGfYsZycUoQE GFO2xsHCpY+0KdIjeIlsxKe3uQd7JbqEkyoFUgGLF5D+z6MV80y5pU3IAwkCTwK0h9 zqz2GoR+DGEcpbL06MZZoFCko+UkXhff64OXZvrJ9hDEyVYBCM1R56YU4wR8Tfh8Vx Lo2KFDdS/SDaEM93KCrIArIpfGcDQqbgFFfT8L/i1m9VqxhcNGUV4AIlT39W2R4Kbc E8SYo2ZCQAnaS0XmJzhE1XM/eyULUbxrQDn4DYTZz945VuWb+4UDZRdNILa8P2J508 jDFBJzmACKD2Q== Date: Mon, 29 Jul 2024 19:44:59 -0700 Subject: [GIT PULL 18/23] xfsprogs: Parent Pointers From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: allison.henderson@oracle.com, catherine.hoang@oracle.com, hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459610.1455085.1608305874091471699.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 2823d8ed93da2bd3880abb52a58e91a920961e27: xfs_repair: check for unknown flags in attr entries (2024-07-29 17:01:11 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/pptrs-6.10_2024-07-29 for you to fetch changes up to b2677fa4f4009abf8de4c15960a2e97dd5370d41: mkfs: enable formatting with parent pointers (2024-07-29 17:01:12 -0700) ---------------------------------------------------------------- xfsprogs: Parent Pointers [v13.8 18/28] This is the latest parent pointer attributes for xfs. The goal of this patch set is to add a parent pointer attribute to each inode. The attribute name containing the parent inode, generation, and directory offset, while the attribute value contains the file name. This feature will enable future optimizations for online scrub, shrink, nfs handles, verity, or any other feature that could make use of quickly deriving an inodes path from the mount point. Directory parent pointers are stored as namespaced extended attributes of a file. Because parent pointers are an indivisible tuple of (dirent_name, parent_ino, parent_gen) we cannot use the usual attr name lookup functions to find a parent pointer. This is solvable by introducing a new lookup mode that checks both the name and the value of the xattr. Therefore, introduce this new name-value lookup mode that's gated on the XFS_ATTR_PARENT namespace. This requires the introduction of new opcodes for the extended attribute update log intent items, which actually means that parent pointers (itself an INCOMPAT feature) does not depend on the LOGGED_XATTRS log incompat feature bit. To reduce collisions on the dirent names of parent pointers, introduce a new attr hash mode that is the dir2 namehash of the dirent name xor'd with the parent inode number. At this point, Allison has moved on to other things, so I've merged her patchset into djwong-dev for merging. Updates since v12 [djwong]: Rebase on 6.9-rc and update the online fsck design document. Redesign the ondisk format to use the name-value lookups to get us back to the point where the attr is (dirent_name -> parent_ino/gen). Updates since v11 [djwong]: Rebase on 6.4-rc and make some tweaks and bugfixes to enable the repair prototypes. Merge with djwong-dev and make online repair actually work. Updates since v10 [djwong]: Merge in the ondisk format changes to get rid of the diroffset conflicts with the parent pointer repair code, rebase the entire series with the attr vlookup changes first, and merge all the other random fixes. Updates since v9: Reordered patches 2 and 3 to be 6 and 7 xfs: Add xfs_verify_pptr moved parent pointer validators to xfs_parent xfs: Add parent pointer ioctl Extra validation checks for fs id added missing release for the inode use GFP_KERNEL flags for malloc/realloc reworked ioctl to use pptr listenty and flex array NEW xfs: don't remove the attr fork when parent pointers are enabled NEW directory lookups should return diroffsets too NEW xfs: move/add parent pointer validators to xfs_parent Updates since v8: xfs: parent pointer attribute creation Fix xfs_parent_init to release log assist on alloc fail Add slab cache for xfs_parent_defer Fix xfs_create to release after unlock Add xfs_parent_start and xfs_parent_finish wrappers removed unused xfs_parent_name_irec and xfs_init_parent_name_irec xfs: add parent attributes to link Start/finish wrapper updates Fix xfs_link to disallow reservationless quotas xfs: add parent attributes to symlink Fix xfs_symlink to release after unlock Start/finish wrapper updates xfs: remove parent pointers in unlink Start/finish wrapper updates Add missing parent free xfs: Add parent pointers to rename Start/finish wrapper updates Fix rename to only grab logged xattr once Fix xfs_rename to disallow reservationless quotas Fix double unlock on dqattach fail Move parent frees to out_release_wip xfs: Add parent pointers to xfs_cross_rename Hoist parent pointers into rename Questions comments and feedback appreciated! Thanks all! Allison This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Allison Henderson (4): xfs_io: Add i, n and f flags to parent command xfs_logprint: decode parent pointers in ATTRI items fully mkfs: Add parent pointers during protofile creation mkfs: enable formatting with parent pointers Darrick J. Wong (20): libxfs: create attr log item opcodes and formats for parent pointers xfs_{db,repair}: implement new attr hash value function xfs_logprint: dump new attr log item fields man: document the XFS_IOC_GETPARENTS ioctl libfrog: report parent pointers to userspace libfrog: add parent pointer support code xfs_io: adapt parent command to new parent pointer ioctls xfs_spaceman: report file paths xfs_scrub: use parent pointers when possible to report file operations xfs_scrub: use parent pointers to report lost file data xfs_db: report parent pointers in version command xfs_db: report parent bit on xattrs xfs_db: report parent pointers embedded in xattrs xfs_db: obfuscate dirent and parent pointer names consistently libxfs: export attr3_leaf_hdr_from_disk via libxfs_api_defs.h xfs_db: add a parents command to list the parents of a file xfs_db: make attr_set and attr_remove handle parent pointers xfs_db: add link and unlink expert commands xfs_db: compute hashes of parent pointers libxfs: create new files with attr forks if necessary db/attr.c | 33 +- db/attrset.c | 202 +++++++++--- db/attrshort.c | 27 ++ db/field.c | 10 + db/field.h | 3 + db/hash.c | 44 ++- db/metadump.c | 322 ++++++++++++++++-- db/namei.c | 701 ++++++++++++++++++++++++++++++++++++++++ db/sb.c | 2 + include/handle.h | 1 + include/xfs_inode.h | 4 + io/parent.c | 541 +++++++++++-------------------- libfrog/Makefile | 2 + libfrog/fsgeom.c | 6 +- libfrog/getparents.c | 355 ++++++++++++++++++++ libfrog/getparents.h | 42 +++ libfrog/paths.c | 168 ++++++++++ libfrog/paths.h | 25 ++ libhandle/handle.c | 7 +- libxfs/defer_item.c | 52 ++- libxfs/init.c | 4 + libxfs/libxfs_api_defs.h | 19 ++ libxfs/util.c | 19 +- logprint/log_redo.c | 217 +++++++++++-- logprint/logprint.h | 5 +- man/man2/ioctl_xfs_getparents.2 | 212 ++++++++++++ man/man8/xfs_db.8 | 59 +++- man/man8/xfs_io.8 | 32 +- man/man8/xfs_spaceman.8 | 7 +- mkfs/lts_4.19.conf | 3 + mkfs/lts_5.10.conf | 3 + mkfs/lts_5.15.conf | 3 + mkfs/lts_5.4.conf | 3 + mkfs/lts_6.1.conf | 3 + mkfs/lts_6.6.conf | 3 + mkfs/proto.c | 62 +++- mkfs/xfs_mkfs.c | 45 ++- repair/attr_repair.c | 24 +- scrub/common.c | 41 ++- scrub/phase6.c | 75 ++++- spaceman/Makefile | 16 +- spaceman/file.c | 7 + spaceman/health.c | 53 ++- spaceman/space.h | 3 + 44 files changed, 2941 insertions(+), 524 deletions(-) create mode 100644 libfrog/getparents.c create mode 100644 libfrog/getparents.h create mode 100644 man/man2/ioctl_xfs_getparents.2 From patchwork Tue Jul 30 02:45:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746461 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17BBC33E8 for ; Tue, 30 Jul 2024 02:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307516; cv=none; b=LBkmQub/6RXOkjpgsxG2dv1vxBPtAHWVDGCCKUw8LFs9TcdvLtI+2cJr4wOMTeD8txotHeqhqrMJTunkNj0ARjr4nYne2I6GoQGcP/VmA1SGhYxKW2OM22CJDmbC+zJOvoWRZVjeeg7IaZClwRDru9pz3/qMVYX/NXyqV5TcI4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307516; c=relaxed/simple; bh=pfO75AwBlHiit0FmmTiKn+JUQo3zU/it/zQ51MR73fE=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=iE3ILazuQdKdULuexUoiT8EKWYsrqqAxNz4LkwRYN+8jqqquwMaTNjjHZTBxId8JCcyiHAQ9U96eDigUjVzNaDf0qo36soKlit7rd9qw/vAYFPMizOnXMzj+Kfb3kdRLhXRRMDZpD4f9MoLLT5bXpmeVk6Qb5DJRURG/QSxtfn8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a/VLWY3f; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a/VLWY3f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3C38C32786; Tue, 30 Jul 2024 02:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307516; bh=pfO75AwBlHiit0FmmTiKn+JUQo3zU/it/zQ51MR73fE=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=a/VLWY3ftJKpdQID07BUuiPKRxVnrGrRBIktoWGsB2huVsspeGsMONvCFVoBAa12P fiBaU57QLR1qNfvFV2m4uyFPrAYBAOyBEPMflkrBbGnznOuGGKn4wCtSfwEskTNfHq XGPcjhltv/TMs0vRHZ2k0pn9nriZxkzkW1VsORR9F4lfdTL6JhiOL0vRfE+3jm1v2r +6AaXkhKuJSOi+ZezO/CABHLC13hHYgU2rxW3R2YF1hfnOmydlhEiWg5F5qP0CdFtg 6qSIAT4jK3ZYlwjGyhk1aLxpHOEmlsUA5xi+w0B8S4sHF0y5aSEeCbU7/cpv6je7RZ 1WHM3VS1vK4dQ== Date: Mon, 29 Jul 2024 19:45:15 -0700 Subject: [GIT PULL 19/23] xfsprogs: scrubbing for parent pointers From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: allison.henderson@oracle.com, catherine.hoang@oracle.com, hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459716.1455085.11463372520280928902.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit b2677fa4f4009abf8de4c15960a2e97dd5370d41: mkfs: enable formatting with parent pointers (2024-07-29 17:01:12 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-pptrs-6.10_2024-07-29 for you to fetch changes up to 4b327cc2f5d03b772dd6d3352cbe28452cd41ef0: man2: update ioctl_xfs_scrub_metadata.2 for parent pointers (2024-07-29 17:01:12 -0700) ---------------------------------------------------------------- xfsprogs: scrubbing for parent pointers [v13.8 19/28] Teach online fsck to use parent pointers to assist in checking directories, parent pointers, extended attributes, and link counts. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (2): xfs: create a blob array data structure man2: update ioctl_xfs_scrub_metadata.2 for parent pointers libxfs/Makefile | 2 + libxfs/xfblob.c | 147 ++++++++++++++++++++++++++++++++++++ libxfs/xfblob.h | 24 ++++++ libxfs/xfile.c | 11 +++ libxfs/xfile.h | 1 + man/man2/ioctl_xfs_scrub_metadata.2 | 20 ++++- 6 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 libxfs/xfblob.c create mode 100644 libxfs/xfblob.h From patchwork Tue Jul 30 02:45:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746462 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFDB33E8 for ; Tue, 30 Jul 2024 02:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307532; cv=none; b=hHtWgutzVpk8KiSYIci/MhivKyckoodRWQhRGBWV0O2O/QEmsrgQI/P2/bpHZcgHM2/+ATxL29G2BNnKijixOJPG5m+1svQGQghSxGt8KNTlA9JU3dt/NwuqUIFoaQYLFfbVxXSy/8+wo8XRow1ABqQLno/bJdzTO0bbdGEX+ac= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307532; c=relaxed/simple; bh=nYmB2qIQnEfonwz6ZaCerovnZbKqOezV1b0VUAn8hbQ=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=fIYDhQe29+jW8HlHB8ycQr5eiodpZKAmISMzOG0MPIIcceJH8HUbgrFhXUgXjQcLFlhESdgvv8cQCWiYxZtf/njcqHt+SUoLmaIiLnep1WZr91GmkZJCfuamG7X0hRafEOuvjNabxuf2VVq8cpehciw94IEhxLSIaAqYBiQ8Iyk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q/Avt5RD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q/Avt5RD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8ED05C32786; Tue, 30 Jul 2024 02:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307531; bh=nYmB2qIQnEfonwz6ZaCerovnZbKqOezV1b0VUAn8hbQ=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=q/Avt5RDj3A0Ojyh85Qz2wVBjOE90fGwnjCa1wr7X/0QgrtnY55+35OMbjCS5kn/T 17nci/pPeeY8ibf4fNKE8I3k2P4pVif0J+4E6/YqKu2DugKm5WlzPwmjcZRChAQQ/X bVsKHCj43fnrZi6hdUAvrh/HDA11/Mgk48++K75wwry/Nnb50AB+GgFq3b9fBS9MXN 17XatsEZnhISQfHA60shjgt4zYdfFnShcdsGH8QPAHsC1LpoNXt4OXzMtFtxBNm9h/ 1KNfzXqmn8X1Rmu7hxd9YP/++uYzghTL026/TFo8CJ6Z+OPepFjCZtmfIRGH9cqWpq hF8JdtNK3MdbQ== Date: Mon, 29 Jul 2024 19:45:31 -0700 Subject: [GIT PULL 20/23] xfsprogs: offline repair for parent pointers From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: allison.henderson@oracle.com, catherine.hoang@oracle.com, hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459824.1455085.8492552821249651926.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 4b327cc2f5d03b772dd6d3352cbe28452cd41ef0: man2: update ioctl_xfs_scrub_metadata.2 for parent pointers (2024-07-29 17:01:12 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/repair-pptrs-6.10_2024-07-29 for you to fetch changes up to 7ea215189a3cac45cb9323439318fcc3410727d4: xfs_repair: wipe ondisk parent pointers when there are none (2024-07-29 17:01:13 -0700) ---------------------------------------------------------------- xfsprogs: offline repair for parent pointers [v13.8 20/28] This series implements online checking and repair for directory parent pointer metadata. The checking half is fairly straightforward -- for each outgoing directory link (forward or backwards), grab the inode at the other end, and confirm that there's a corresponding link. If we can't grab an inode or lock it, we'll save that link for a slower loop that cycles all the locks, confirms the continued existence of the link, and rechecks the link if it's actually still there. Repairs are a bit more involved -- for directories, we walk the entire filesystem to rebuild the dirents from parent pointer information. Parent pointer repairs do the same walk but rebuild the pptrs from the dirent information, but with the added twist that it duplicates all the xattrs so that it can use the atomic extent swapping code to commit the repairs atomically. This introduces an added twist to the xattr repair code -- we use dirent hooks to detect a colliding update to the pptr data while we're not holding the ILOCKs; if one is detected, we restart the xattr salvaging process but this time hold all the ILOCKs until the end of the scan. For offline repair, the phase6 directory connectivity scan generates an index of all the expected parent pointers in the filesystem. Then it walks each file and compares the parent pointers attached to that file against the index generated, and resyncs the results as necessary. The last patch teaches xfs_scrub to report pathnames of files that are being repaired, when possible. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (12): xfs_db: remove some boilerplate from xfs_attr_set xfs_db: actually report errors from libxfs_attr_set xfs_repair: junk parent pointer attributes when filesystem doesn't support them xfs_repair: add parent pointers when messing with /lost+found xfs_repair: junk duplicate hashtab entries when processing sf dirents xfs_repair: build a parent pointer index xfs_repair: move the global dirent name store to a separate object xfs_repair: deduplicate strings stored in string blob xfs_repair: check parent pointers xfs_repair: dump garbage parent pointer attributes xfs_repair: update ondisk parent pointer records xfs_repair: wipe ondisk parent pointers when there are none db/attrset.c | 36 +- libxfs/libxfs_api_defs.h | 6 + libxfs/xfblob.c | 9 + libxfs/xfblob.h | 2 + repair/Makefile | 6 + repair/attr_repair.c | 30 ++ repair/listxattr.c | 271 ++++++++++ repair/listxattr.h | 15 + repair/phase6.c | 121 ++++- repair/pptr.c | 1331 ++++++++++++++++++++++++++++++++++++++++++++++ repair/pptr.h | 17 + repair/strblobs.c | 211 ++++++++ repair/strblobs.h | 24 + 13 files changed, 2069 insertions(+), 10 deletions(-) create mode 100644 repair/listxattr.c create mode 100644 repair/listxattr.h create mode 100644 repair/pptr.c create mode 100644 repair/pptr.h create mode 100644 repair/strblobs.c create mode 100644 repair/strblobs.h From patchwork Tue Jul 30 02:45:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746463 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A56A333E8 for ; Tue, 30 Jul 2024 02:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307547; cv=none; b=KzJU2B9TOsprzerjbbOdmE++r7JHWQbbxXmoCJRVMK3XfHpfR7FNnn42Eq3hHXK5GnuhxZgQoVeM9itzKUswJTEO+ny4T0fuI9Nta0qyReuU4dvRw1XgU4KhpTQXLy+DbmWsdnEjpqdG5+8/M4qiWc/gunDCHxR7fae0A/6jJwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307547; c=relaxed/simple; bh=Nqtl6Yn3gwJ2cPB7TBXC/CB2b7tAzGgiuW+Bmm4vOsY=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=tITqW2H/P6pfGe2AVBEG7FBkeCBliPTEHZaZBlVyJSmtG2D0OX+JUvYqQR5KoTYDMoghuN0dfSWih1OqFGahU6UWyTcCL+VWXdBtibjEXjBzZo1mbPzZt5T08DZU+aittaIGDLatSMi28BTNjMEukgwflvp11xBWvM4epWNbyxM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iFg0n/vi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iFg0n/vi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CAE7C32786; Tue, 30 Jul 2024 02:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307547; bh=Nqtl6Yn3gwJ2cPB7TBXC/CB2b7tAzGgiuW+Bmm4vOsY=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=iFg0n/viedbl8HO5vxoAiRXwjf4da26253N+CrOs4NpvBykjZ1/3OSowOnUuErBbP KvCNWL7Bqu4Oczvcahh5URXopbQbLs8Jy7kkMYQfYzILwHBtxnKkPa+q9a3UmR60dp NWy1muB2sE3X7MPOBHTmCJj2mliUVPKEe2QgLyD2GH3sthO6eP7+l4y5Vtn+wQCJG2 4AsxiUtuCiXgnmcsWcYvN/Ecv56W9egRRTZbBSLgv23OaRls5KxFAzqvIOoDGeuq2+ zuXWYPn/bSRglbPtYv9sSAtYmtNOnTLN2uwHnYDzlxJRKuWIjCs8gQ32sry+qTRKAv KtchWxIJ3GgxQ== Date: Mon, 29 Jul 2024 19:45:46 -0700 Subject: [GIT PULL 21/23] xfsprogs: detect and correct directory tree problems From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230459923.1455085.16884260843364802823.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 7ea215189a3cac45cb9323439318fcc3410727d4: xfs_repair: wipe ondisk parent pointers when there are none (2024-07-29 17:01:13 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/scrub-directory-tree-6.10_2024-07-29 for you to fetch changes up to 5a30504f0c60e10dc0cecd201c5afc18083fd0ac: xfs_scrub: defer phase5 file scans if dirloop fails (2024-07-29 17:01:13 -0700) ---------------------------------------------------------------- xfsprogs: detect and correct directory tree problems [v13.8 21/28] Historically, checking the tree-ness of the directory tree structure has not been complete. Cycles of subdirectories break the tree properties, as do subdirectories with multiple parents. It's easy enough for DFS to detect problems as long as one of the participants is reachable from the root, but this technique cannot find unconnected cycles. Directory parent pointers change that, because we can discover all of these problems from a simple walk from a subdirectory towards the root. For each child we start with, if the walk terminates without reaching the root, we know the path is disconnected and ought to be attached to the lost and found. If we find ourselves, we know this is a cycle and can delete an incoming edge. If we find multiple paths to the root, we know to delete an incoming edge. Even better, once we've finished walking paths, we've identified the good ones and know which other path(s) to remove. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (5): libfrog: add directory tree structure scrubber to scrub library xfs_spaceman: report directory tree corruption in the health information xfs_scrub: fix erroring out of check_inode_names xfs_scrub: detect and repair directory tree corruptions xfs_scrub: defer phase5 file scans if dirloop fails libfrog/scrub.c | 5 + man/man2/ioctl_xfs_bulkstat.2 | 3 + man/man2/ioctl_xfs_fsbulkstat.2 | 3 + man/man2/ioctl_xfs_scrub_metadata.2 | 14 ++ scrub/phase5.c | 271 ++++++++++++++++++++++++++++++++++-- scrub/repair.c | 13 ++ scrub/repair.h | 2 + spaceman/health.c | 4 + 8 files changed, 301 insertions(+), 14 deletions(-) From patchwork Tue Jul 30 02:46:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746464 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12D0133E8 for ; Tue, 30 Jul 2024 02:46:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307563; cv=none; b=Q562RXcFHHtKellWmnl4YTKICUq+Z+tB2VVMYIF7QJjZ9ghkuRf50bcn8UHRbPKcgHbgFZ5I6BxbTifXfvYO45cBGdOg9FvQ2200K0AwUlvg2gIZdATWPfBWQY1QARgjLFOb7mK55F/dl3TBmazzapALDQyz+hPLxwM6ciwjYLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307563; c=relaxed/simple; bh=sD6dHW4VNzzjbc0PXf0owfd79RzlFIttm1TvVsikQtw=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=Zk0l7SbWqA0klh0kEU8vsUfb1LtRtJVBW7hWjNJ0zkyAuu4NWMoh6F8K3XfUJ1MQBB4QfT4WTIQ0wZyWRdAdu4QTVyRzQ1oZzBkx2H9Vf4Tp+afDbDRL3iYRWwr8AbOC0Qhxr2OdO8dKg4s8BSRRZ3+8yYENe8u0lUSd/X8NaV0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y3GCxLxZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y3GCxLxZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBE51C32786; Tue, 30 Jul 2024 02:46:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307562; bh=sD6dHW4VNzzjbc0PXf0owfd79RzlFIttm1TvVsikQtw=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=Y3GCxLxZPtMKMC5lgg+lxvNwCa9OfuBRdnw70Y67gpzOrombudG08MU5iRzvRYTs9 clUvlBvSiCrQ0rMj7L6hfYmGAHjt8YCleK6UEKdx5BPz558ajQ5WIBOi9Xnb9liDdT 1OxTDwAf/IGeq7ZQHPpYPw3bmlAKzMeeRHM4vukjCiB2hHJnGyNR+53Naa9NBIsMqa VTc5iC1U7Pl15speLebwaepdW+ljGQfy6v4VxaMRNh0jPOoCFvUVIFAS2IPjaE/1Xx SQlIC9o+32OAq63Ta/7zmB9bN1iypAHLKSrApoQrC5LkiQji6hmcvEnZjTYSs2bMAu 9t1UgHXO+oDFA== Date: Mon, 29 Jul 2024 19:46:02 -0700 Subject: [GIT PULL 22/23] xfs_scrub: vectorize kernel calls From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230460022.1455085.11627065701892282147.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit 5a30504f0c60e10dc0cecd201c5afc18083fd0ac: xfs_scrub: defer phase5 file scans if dirloop fails (2024-07-29 17:01:13 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/vectorized-scrub-6.10_2024-07-29 for you to fetch changes up to df914edeeb1e1919831192951d657cfc73b46418: xfs_scrub: try spot repairs of metadata items to make scrub progress (2024-07-29 17:01:13 -0700) ---------------------------------------------------------------- xfs_scrub: vectorize kernel calls [v30.9 22/28] Create a vectorized version of the metadata scrub and repair ioctl, and adapt xfs_scrub to use that. This is an experiment to measure overhead and to try refactoring xfs_scrub. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (10): man: document vectored scrub mode libfrog: support vectored scrub xfs_io: support vectored scrub xfs_scrub: split the scrub epilogue code into a separate function xfs_scrub: split the repair epilogue code into a separate function xfs_scrub: convert scrub and repair epilogues to use xfs_scrub_vec xfs_scrub: vectorize scrub calls xfs_scrub: vectorize repair calls xfs_scrub: use scrub barriers to reduce kernel calls xfs_scrub: try spot repairs of metadata items to make scrub progress io/scrub.c | 368 +++++++++++++++++++++++++++++++---- libfrog/fsgeom.h | 6 + libfrog/scrub.c | 137 +++++++++++++ libfrog/scrub.h | 35 ++++ man/man2/ioctl_xfs_scrubv_metadata.2 | 171 ++++++++++++++++ man/man8/xfs_io.8 | 51 +++++ scrub/phase1.c | 2 + scrub/phase2.c | 93 +++++++-- scrub/phase3.c | 84 ++++++-- scrub/repair.c | 355 ++++++++++++++++++++------------- scrub/scrub.c | 360 +++++++++++++++++++++++++--------- scrub/scrub.h | 19 ++ scrub/scrub_private.h | 55 ++++-- scrub/xfs_scrub.c | 1 + 14 files changed, 1431 insertions(+), 306 deletions(-) create mode 100644 man/man2/ioctl_xfs_scrubv_metadata.2 From patchwork Tue Jul 30 02:46:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746466 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8A1DCA6F for ; Tue, 30 Jul 2024 02:46:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307578; cv=none; b=bsgdfLkwbFtncTFn9N7YjkAprsSYVd0KyE3hI/qJwz5Zi3K6O+tAvZ5XctpfC7G5FVS2x4f54A8UlmPJvSThjwhwNUscwkMdhNaqYjjuqJfGPutdn7wxdBz9EE53MP/c21961P72YqNytRAiipMKzjAI15nVuaZDyTRr4JV2Rzk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722307578; c=relaxed/simple; bh=MTRfib7wbAt5TwZwy3vPUlchmd9WaFe3ICUPtTr5DMs=; h=Date:Subject:From:To:Cc:Message-ID:MIME-Version:In-Reply-To: References:Content-Type; b=H1+uaOd93SZTmKSTvjvRX3ucJw5QSQ/9Pb9ohSVlSSEsQkhXOW1T5yLmqQ+ejXY+kIw9vCj4hAM2ILkb/28ttzdxqlnRQs23yxrO3+AgRbziu0XNl3Ta+sL9L7/s55wVQJEFJhCb3nBT4L0OZ4Oj9/t3GPaottCV36kd3P80MP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k8etkOtd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k8etkOtd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EAB6C32786; Tue, 30 Jul 2024 02:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722307578; bh=MTRfib7wbAt5TwZwy3vPUlchmd9WaFe3ICUPtTr5DMs=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=k8etkOtdaX3gDptOoAb6o0vi0u86Qy8XM9siNDYLKRs0LMmVFnfxcT6Moq2vmIm27 hRfLYgM0Ee9h/eGggMhatoiQVPcl5ySHX0u/XKzEzVJC/ZbFCU/ohTwyUao50kCJIB JTJGOaUtqrl8y7e7GaObDFGUhhEB2wtU19QxOjNc1pzdbtqfZky0u+HXTbdPxo3lwE ZAFV41ViqWG7hjRk+8UIlN+nIiof86zstwrdasBoSLdKRn4UyZR4wiptQVQeA6K/JE tJrIsIvZA5VH4sYcSzh4NQ/H5Lc2rIiQl0lAyRfATiqPgDZvQh1gu0j3+W3y0XLELS SxGPMMR2OMZOg== Date: Mon, 29 Jul 2024 19:46:18 -0700 Subject: [GIT PULL 23/23] xfs_repair: fixes for kernel 6.10 From: "Darrick J. Wong" To: cem@kernel.org, djwong@kernel.org Cc: hch@lst.de, linux-xfs@vger.kernel.org Message-ID: <172230460123.1455085.10638034565139241088.stg-ugh@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240730013626.GF6352@frogsfrogsfrogs> References: <20240730013626.GF6352@frogsfrogsfrogs> Hi Carlos, Please pull this branch with changes for xfsprogs for 6.10-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. The following changes since commit df914edeeb1e1919831192951d657cfc73b46418: xfs_scrub: try spot repairs of metadata items to make scrub progress (2024-07-29 17:01:13 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git tags/repair-fixes-6.10_2024-07-29 for you to fetch changes up to 5a43a00432ebe9ab8b54155703a9eb9e1a1dd4ec: xfs_repair: allow symlinks with short remote targets (2024-07-29 17:01:13 -0700) ---------------------------------------------------------------- xfs_repair: fixes for kernel 6.10 [v30.9 23/28] Fix some incorrect validation problems in xfs_repair. This has been running on the djcloud for months with no problems. Enjoy! Signed-off-by: Darrick J. Wong ---------------------------------------------------------------- Darrick J. Wong (1): xfs_repair: allow symlinks with short remote targets repair/dinode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)