Patch "xfs: report corruption only as a regular error" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfs: report corruption only as a regular error

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-report-corruption-only-as-a-regular-error.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From stable-owner@xxxxxxxxxxxxxxx Wed Apr 12 06:29:08 2023
From: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Date: Wed, 12 Apr 2023 09:56:20 +0530
Subject: xfs: report corruption only as a regular error
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: sashal@xxxxxxxxxx, mcgrof@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, djwong@xxxxxxxxxx, chandan.babu@xxxxxxxxxx, amir73il@xxxxxxxxx, leah.rumancik@xxxxxxxxx
Message-ID: <20230412042624.600511-14-chandan.babu@xxxxxxxxxx>

From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>

commit 6519f708cc355c4834edbe1885c8542c0e7ef907 uptream.

[ Slightly modify fs/xfs/xfs_linux.h to resolve merge conflicts ]

Redefine XFS_IS_CORRUPT so that it reports corruptions only via
xfs_corruption_report.  Since these are on-disk contents (and not checks
of internal state), we don't ever want to panic the kernel.  This also
amends the corruption report to recommend unmounting and running
xfs_repair.

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/xfs/xfs_error.c |    2 +-
 fs/xfs/xfs_linux.h |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

--- a/fs/xfs/xfs_error.c
+++ b/fs/xfs/xfs_error.c
@@ -335,7 +335,7 @@ xfs_corruption_error(
 	int			linenum,
 	xfs_failaddr_t		failaddr)
 {
-	if (level <= xfs_error_level)
+	if (buf && level <= xfs_error_level)
 		xfs_hex_dump(buf, bufsize);
 	xfs_error_report(tag, level, mp, filename, linenum, failaddr);
 	xfs_alert(mp, "Corruption detected. Unmount and run xfs_repair");
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -217,6 +217,12 @@ int xfs_rw_bdev(struct block_device *bde
 #endif /* XFS_WARN */
 #endif /* DEBUG */
 
+#define XFS_IS_CORRUPT(mp, expr)	\
+	(unlikely(expr) ? xfs_corruption_error(#expr, XFS_ERRLEVEL_LOW, (mp), \
+					       NULL, 0, __FILE__, __LINE__, \
+					       __this_address), \
+			  true : false)
+
 #define STATIC static noinline
 
 #ifdef CONFIG_XFS_RT


Patches currently in stable-queue which might be from stable-owner@xxxxxxxxxxxxxxx are

queue-5.4/xfs-merge-the-projid-fields-in-struct-xfs_icdinode.patch
queue-5.4/xfs-simplify-a-check-in-xfs_ioctl_setattr_check_cowextsize.patch
queue-5.4/xfs-shut-down-the-filesystem-if-we-screw-up-quota-reservation.patch
queue-5.4/irqdomain-fix-mapping-creation-race.patch
queue-5.4/xfs-add-a-new-xfs_sb_version_has_v3inode-helper.patch
queue-5.4/xfs-only-check-the-superblock-version-for-dinode-size-calculation.patch
queue-5.4/xfs-force-log-and-push-ail-to-clear-pinned-inodes-when-aborting-mount.patch
queue-5.4/xfs-fix-up-non-directory-creation-in-sgid-directories.patch
queue-5.4/xfs-consider-shutdown-in-bmapbt-cursor-delete-assert.patch
queue-5.4/xfs-set-inode-size-after-creating-symlink.patch
queue-5.4/xfs-remove-the-kuid-kgid-conversion-wrappers.patch
queue-5.4/xfs-ensure-that-the-inode-uid-gid-match-values-match-the-icdinode-ones.patch
queue-5.4/xfs-remove-the-icdinode-di_uid-di_gid-members.patch
queue-5.4/xfs-don-t-reuse-busy-extents-on-extent-trim.patch
queue-5.4/irqdomain-refactor-__irq_domain_alloc_irqs.patch
queue-5.4/xfs-simplify-di_flags2-inheritance-in-xfs_ialloc.patch
queue-5.4/irqdomain-look-for-existing-mapping-only-once.patch
queue-5.4/xfs-show-the-proper-user-quota-options.patch
queue-5.4/xfs-report-corruption-only-as-a-regular-error.patch
queue-5.4/xfs-remove-the-di_version-field-from-struct-icdinode.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux