]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/0014-Emit-an-error-message-before-MMP-suspends-pool.patch
update ZFS to 0.7.7
[zfsonlinux.git] / zfs-patches / 0014-Emit-an-error-message-before-MMP-suspends-pool.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: "John L. Hammond" <35266395+jhammond-intel@users.noreply.github.com>
3 Date: Wed, 17 Jan 2018 14:24:42 -0600
4 Subject: [PATCH] Emit an error message before MMP suspends pool
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 In mmp_thread(), emit an MMP specific error message before calling
10 zio_suspend() so that the administrator will understand why the pool
11 is being suspended.
12
13 Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
14 Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
15 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
16 Signed-off-by: John L. Hammond <john.hammond@intel.com>
17 Closes #7048
18 (cherry picked from commit ecc972c7f009e1fa75900e276a4c1306c55b5722)
19 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20 ---
21 module/zfs/mmp.c | 5 +++++
22 1 file changed, 5 insertions(+)
23
24 diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c
25 index 6f2aa3f59..e91ae628a 100644
26 --- a/module/zfs/mmp.c
27 +++ b/module/zfs/mmp.c
28 @@ -26,6 +26,7 @@
29 #include <sys/mmp.h>
30 #include <sys/spa.h>
31 #include <sys/spa_impl.h>
32 +#include <sys/time.h>
33 #include <sys/vdev.h>
34 #include <sys/vdev_impl.h>
35 #include <sys/zfs_context.h>
36 @@ -428,6 +429,10 @@ mmp_thread(spa_t *spa)
37 */
38 if (!suspended && mmp_fail_intervals && multihost &&
39 (start - mmp->mmp_last_write) > max_fail_ns) {
40 + cmn_err(CE_WARN, "MMP writes to pool '%s' have not "
41 + "succeeded in over %llus; suspending pool",
42 + spa_name(spa),
43 + NSEC2SEC(start - mmp->mmp_last_write));
44 zio_suspend(spa, NULL);
45 }
46
47 --
48 2.14.2
49