From: Christoph Hellwig Date: Sun, 22 Feb 2026 22:41:10 +0000 (-0800) Subject: xfs: don't validate error tags in the I/O path X-Git-Tag: v7.0.0~72 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1edef5ba034f882a54385767b7348b2dbb19e16f;p=xfsprogs-dev.git xfs: don't validate error tags in the I/O path Source kernel commit: b8862a09d8256a9037293f1da3b4617b21de26f1 We can trust XFS developers enough to not pass random stuff to XFS_ERROR_TEST/DELAY. Open code the validity check in xfs_errortag_add, which is the only place that receives unvalidated error tag values from user space, and drop the now pointless xfs_errortag_enabled helper. Signed-off-by: Christoph Hellwig Reviewed-by: Hans Holmberg Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_errortag.h b/libxfs/xfs_errortag.h index 57e47077..b7d98471 100644 --- a/libxfs/xfs_errortag.h +++ b/libxfs/xfs_errortag.h @@ -53,7 +53,7 @@ * Drop-writes support removed because write error handling cannot trash * pre-existing delalloc extents in any useful way anymore. We retain the * definition so that we can reject it as an invalid value in - * xfs_errortag_valid(). + * xfs_errortag_add(). */ #define XFS_ERRTAG_DROP_WRITES 28 #define XFS_ERRTAG_LOG_BAD_CRC 29