From daa3166ed3c108ee0edc6efbdc700634d417153e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 4 Feb 2025 19:03:34 +0100 Subject: [PATCH] 6.1-stable patches added patches: btrfs-output-the-reason-for-open_ctree-failure.patch --- ...ut-the-reason-for-open_ctree-failure.patch | 46 +++++++++++++++++++ queue-6.1/series | 1 + 2 files changed, 47 insertions(+) create mode 100644 queue-6.1/btrfs-output-the-reason-for-open_ctree-failure.patch diff --git a/queue-6.1/btrfs-output-the-reason-for-open_ctree-failure.patch b/queue-6.1/btrfs-output-the-reason-for-open_ctree-failure.patch new file mode 100644 index 0000000000..cceb35307a --- /dev/null +++ b/queue-6.1/btrfs-output-the-reason-for-open_ctree-failure.patch @@ -0,0 +1,46 @@ +From d0f038104fa37380e2a725e669508e43d0c503e9 Mon Sep 17 00:00:00 2001 +From: Qu Wenruo +Date: Tue, 10 Dec 2024 15:23:06 +1030 +Subject: btrfs: output the reason for open_ctree() failure + +From: Qu Wenruo + +commit d0f038104fa37380e2a725e669508e43d0c503e9 upstream. + +There is a recent ML report that mounting a large fs backed by hardware +RAID56 controller (with one device missing) took too much time, and +systemd seems to kill the mount attempt. + +In that case, the only error message is: + + BTRFS error (device sdj): open_ctree failed + +There is no reason on why the failure happened, making it very hard to +understand the reason. + +At least output the error number (in the particular case it should be +-EINTR) to provide some clue. + +Link: https://lore.kernel.org/linux-btrfs/9b9c4d2810abcca2f9f76e32220ed9a90febb235.camel@scientia.org/ +Reported-by: Christoph Anton Mitterer +Cc: stable@vger.kernel.org +Reviewed-by: Filipe Manana +Signed-off-by: Qu Wenruo +Reviewed-by: David Sterba +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman +--- + fs/btrfs/super.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/btrfs/super.c ++++ b/fs/btrfs/super.c +@@ -1468,7 +1468,7 @@ static int btrfs_fill_super(struct super + + err = open_ctree(sb, fs_devices, (char *)data); + if (err) { +- btrfs_err(fs_info, "open_ctree failed"); ++ btrfs_err(fs_info, "open_ctree failed: %d", err); + return err; + } + diff --git a/queue-6.1/series b/queue-6.1/series index 922f432cb7..e65b9f269b 100644 --- a/queue-6.1/series +++ b/queue-6.1/series @@ -276,3 +276,4 @@ media-uvcvideo-fix-double-free-in-error-path.patch usb-gadget-f_tcm-don-t-free-command-immediately.patch staging-media-max96712-fix-kernel-oops-when-removing-module.patch media-imx-jpeg-fix-potential-error-pointer-dereference-in-detach_pm.patch +btrfs-output-the-reason-for-open_ctree-failure.patch -- 2.47.2