From mboxrd@z Thu Jan 1 00:00:00 1970 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 30B272C235C for ; Tue, 19 Aug 2025 03:06:09 +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=1755572770; cv=none; b=ReOnktHp66NeI0m9Dwh2gltDsx3jD6Gy0rDD1RNZMESx9rlMHvqEHpvbn1qnxgTXhiSpQqSHAHP4NZVJd1Xt3OhoEgm+c2q/fL31IQk/8bkI4VzKjmx5ItYLYl5H8Aoyh3HXZRtcb8XqFVSBTJ5H9NX/3tTT43coWA5qh6MRzxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755572770; c=relaxed/simple; bh=1sVARoojA1uZfB/ZzfxXBf4J7cGHmBLdc4akc9hCpMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EP33RJd2BBTXUDczjQKfQRr8DAmPn1+m2+CP/iKLL7cdVQ1MoMhvljcbg3VcqEuUaXg86dJtyZqLUN4NayJhQMOyAw/+CJYbVpl5gYdZgfBqmMdX+VHGQdnKkvcm47NV32trG1U9K4WBCB3JtPj8bz8dYEzwSKJtn24do6lCBS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G/KlMXqK; 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="G/KlMXqK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3A75C4CEEB; Tue, 19 Aug 2025 03:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755572769; bh=1sVARoojA1uZfB/ZzfxXBf4J7cGHmBLdc4akc9hCpMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G/KlMXqKx5YZ1opHIJdGG1N+s4w3ljsvAm/xfDM3ceh4wJbaexFyf3Iy9O8C6Npub ST/ep/jo7Z7ma+vdzkC9q8w4aU06VAioQmAoK5iLdIoI3MCdBLHD2BCtq3/Le8GDOI 6qaZVB8PJfs9R1vVC8rffD+7PpgHD0jqadXCqI584x/32wwZuHVABra/J/4hUWlgIc UBttwiYzv8gE3ii+TV/sLrl9Z9qbRNUypbxLimpXI68RF7fqzVT6BD2DZ2rEsNb9yC bUwDR6dIcVrODqDQDN6Ol7bCRCwb42E+YKDpHmxJ40dmQ5iMVMYJQGcFKLiWLOPrhg QE92NvdGYdJQg== From: Sasha Levin To: stable@vger.kernel.org Cc: Christoph Hellwig , cen zhang , "Darrick J. Wong" , Carlos Maiolino , Sasha Levin Subject: [PATCH 6.1.y] xfs: fully decouple XFS_IBULK* flags from XFS_IWALK* flags Date: Mon, 18 Aug 2025 23:06:06 -0400 Message-ID: <20250819030606.304788-1-sashal@kernel.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <2025081859-matcher-handprint-c398@gregkh> References: <2025081859-matcher-handprint-c398@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Christoph Hellwig [ Upstream commit d2845519b0723c5d5a0266cbf410495f9b8fd65c ] Fix up xfs_inumbers to now pass in the XFS_IBULK* flags into the flags argument to xfs_inobt_walk, which expects the XFS_IWALK* flags. Currently passing the wrong flags works for non-debug builds because the only XFS_IWALK* flag has the same encoding as the corresponding XFS_IBULK* flag, but in debug builds it can trigger an assert that no incorrect flag is passed. Instead just extra the relevant flag. Fixes: 5b35d922c52798 ("xfs: Decouple XFS_IBULK flags from XFS_IWALK flags") Cc: # v5.19 Reported-by: cen zhang Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino [ Adjust context ] Signed-off-by: Sasha Levin --- fs/xfs/xfs_itable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 44d603364d5a..bd59b34edc00 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -422,11 +422,15 @@ xfs_inumbers( .breq = breq, }; struct xfs_trans *tp; + unsigned int iwalk_flags = 0; int error = 0; if (xfs_bulkstat_already_done(breq->mp, breq->startino)) return 0; + if (breq->flags & XFS_IBULK_SAME_AG) + iwalk_flags |= XFS_IWALK_SAME_AG; + /* * Grab an empty transaction so that we can use its recursive buffer * locking abilities to detect cycles in the inobt without deadlocking. @@ -435,7 +439,7 @@ xfs_inumbers( if (error) goto out; - error = xfs_inobt_walk(breq->mp, tp, breq->startino, breq->flags, + error = xfs_inobt_walk(breq->mp, tp, breq->startino, iwalk_flags, xfs_inumbers_walk, breq->icount, &ic); xfs_trans_cancel(tp); out: -- 2.50.1