]> granicus.if.org Git - zfs/commitdiff
Do not initiate MMP writes while pool is suspended
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 22 Feb 2018 17:14:46 +0000 (09:14 -0800)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Mar 2018 23:10:37 +0000 (16:10 -0700)
While the pool is suspended on host A, it may be imported on host B.
If host A continued to write MMP blocks, it would be blindly
overwriting MMP blocks written by host B, and the blocks written by
host A would have outdated txg information.

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #7182

module/zfs/mmp.c

index 1dfb7c05b45580929e5f5e44dc738be4140e26a5..d003d79debab3f025407ea92c442b612da4711f3 100644 (file)
@@ -437,7 +437,7 @@ mmp_thread(spa_t *spa)
                        zio_suspend(spa, NULL);
                }
 
-               if (multihost)
+               if (multihost && !suspended)
                        mmp_write_uberblock(spa);
 
                CALLB_CPR_SAFE_BEGIN(&cpr);