]>
Commit | Line | Data |
---|---|---|
75b07eca FG |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: sanjeevbagewadi <sanjeev.bagewadi@gmail.com> | |
3 | Date: Tue, 13 Feb 2018 01:00:38 +0530 | |
4 | Subject: [PATCH] mmp should use a fixed tag for spa_config locks | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | mmp_write_uberblock() and mmp_write_done() should the same tag | |
10 | for spa_config_locks. | |
11 | ||
12 | Reviewed-by: Olaf Faaland <faaland1@llnl.gov> | |
13 | Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> | |
14 | Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> | |
15 | Signed-off-by: Sanjeev Bagewadi <sanjeev.bagewadi@gmail.com> | |
16 | Closes #6530 | |
17 | Closes #7155 | |
18 | (cherry picked from commit d85011ed696b41f4de963f7932dfb53ea871278b) | |
19 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
20 | --- | |
21 | module/zfs/mmp.c | 5 +++-- | |
22 | 1 file changed, 3 insertions(+), 2 deletions(-) | |
23 | ||
24 | diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c | |
25 | index e91ae628a..1dfb7c05b 100644 | |
26 | --- a/module/zfs/mmp.c | |
27 | +++ b/module/zfs/mmp.c | |
28 | @@ -125,6 +125,7 @@ uint_t zfs_multihost_import_intervals = MMP_DEFAULT_IMPORT_INTERVALS; | |
29 | uint_t zfs_multihost_fail_intervals = MMP_DEFAULT_FAIL_INTERVALS; | |
30 | ||
31 | static void mmp_thread(spa_t *spa); | |
32 | +char *mmp_tag = "mmp_write_uberblock"; | |
33 | ||
34 | void | |
35 | mmp_init(spa_t *spa) | |
36 | @@ -278,7 +279,7 @@ mmp_write_done(zio_t *zio) | |
37 | ||
38 | unlock: | |
39 | mutex_exit(&mts->mmp_io_lock); | |
40 | - spa_config_exit(spa, SCL_STATE, FTAG); | |
41 | + spa_config_exit(spa, SCL_STATE, mmp_tag); | |
42 | ||
43 | abd_free(zio->io_abd); | |
44 | } | |
45 | @@ -314,7 +315,7 @@ mmp_write_uberblock(spa_t *spa) | |
46 | int label; | |
47 | uint64_t offset; | |
48 | ||
49 | - spa_config_enter(spa, SCL_STATE, FTAG, RW_READER); | |
50 | + spa_config_enter(spa, SCL_STATE, mmp_tag, RW_READER); | |
51 | vd = mmp_random_leaf(spa->spa_root_vdev); | |
52 | if (vd == NULL) { | |
53 | spa_config_exit(spa, SCL_STATE, FTAG); | |
54 | -- | |
55 | 2.14.2 | |
56 |