Skip to content

Commit 218b169

Browse files
bmarzinsMikulas Patocka
authored andcommitted
dm mpath: make pg_init_delay_msecs settable
"pg_init_delay_msecs X" can be passed as a feature in the multipath table and is used to set m->pg_init_delay_msecs in parse_features(). However, alloc_multipath_stage2(), which is called after parse_features(), resets m->pg_init_delay_msecs to its default value. Instead, set m->pg_init_delay_msecs in alloc_multipath(), which is called before parse_features(), to avoid overwriting a value passed in by the table. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Cc: stable@vger.kernel.org
1 parent 4550a71 commit 218b169

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/dm-mpath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ static struct multipath *alloc_multipath(struct dm_target *ti)
225225
mutex_init(&m->work_mutex);
226226

227227
m->queue_mode = DM_TYPE_NONE;
228+
m->pg_init_delay_msecs = DM_PG_INIT_DELAY_DEFAULT;
228229

229230
m->ti = ti;
230231
ti->private = m;
@@ -251,7 +252,6 @@ static int alloc_multipath_stage2(struct dm_target *ti, struct multipath *m)
251252
set_bit(MPATHF_QUEUE_IO, &m->flags);
252253
atomic_set(&m->pg_init_in_progress, 0);
253254
atomic_set(&m->pg_init_count, 0);
254-
m->pg_init_delay_msecs = DM_PG_INIT_DELAY_DEFAULT;
255255
init_waitqueue_head(&m->pg_init_wait);
256256
init_waitqueue_head(&m->probe_wait);
257257

0 commit comments

Comments
 (0)