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 8432C199935; Tue, 26 Aug 2025 11:42:17 +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=1756208537; cv=none; b=k2fknIr22U/kzQt1y/0p3I23fdji4/dMunxHI9pmHtrzYjK9VS+MLp/sr0V3FU6DKw4WKVxxlxM0AVWJlFfBGrWAks+0r/W+O9YVpbS3t0vPjJM+SkWXrI9oN8+ostwbgrcLX7Oc2t/UWb7vtsVLwVhxpODAV93N20BmtK8cqjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756208537; c=relaxed/simple; bh=EahNsT5bkGtZaOLa3qz1REDHhF+oYUsg1qYggMnXoVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WfOZs2XEjhZQXNKCJ7/RHMMBTz4T+/d3jD2+MEaBuxSkkdnsqh1euEk9eun11AzIkexbP4Fhti6zaUY3ipGWx4gCB2m0gWYhj0V2L8KZvhMtbwEkTRuCVPXrjgrK/f/rz72LEAGGIGMqvOPHhQsu1NZwpCFzQBpCn/xeM9TpQsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=K/A35Zmu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="K/A35Zmu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14461C4CEF1; Tue, 26 Aug 2025 11:42:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756208537; bh=EahNsT5bkGtZaOLa3qz1REDHhF+oYUsg1qYggMnXoVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K/A35ZmucaHx80K6L3303Ds/aN1FyY6+JaCtUSrF+ZBNjEzwIaCH2uTwPKSlpkjJn Pr0qMRXFiS6d0sWzDnr5SlmwCWTvp4/+CESeK1JQrsqCfj0zH6TU/+Ofb/VSakLeB/ NrjOw/VSptGA++Sw1kpEMlw8MUtruD7njcMzLPGc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, cen zhang , Christoph Hellwig , "Darrick J. Wong" , Carlos Maiolino , Sasha Levin Subject: [PATCH 6.12 150/322] xfs: fully decouple XFS_IBULK* flags from XFS_IWALK* flags Date: Tue, 26 Aug 2025 13:09:25 +0200 Message-ID: <20250826110919.513730874@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110915.169062587@linuxfoundation.org> References: <20250826110915.169062587@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_itable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -430,11 +430,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. @@ -443,7 +447,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: