* [RFC PATCH] multipath: flush workqueue only in necessary
@ 2018-03-12 7:41 wuzhouhui
2018-03-22 8:02 ` Changwei Ge
0 siblings, 1 reply; 2+ messages in thread
From: wuzhouhui @ 2018-03-12 7:41 UTC (permalink / raw)
To: dm-devel
When flush works belong a specific multipath, we flush workqueue only
in necessary.
(That's my first time to send a patch, please remind me if anything
wrong)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index f7810cc..0f14732 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1154,9 +1154,10 @@ static void flush_multipath_work(struct multipath *m)
set_bit(MPATHF_PG_INIT_DISABLED, &m->flags);
smp_mb__after_atomic();
- flush_workqueue(kmpath_handlerd);
+ if (atomic_read(&m->pg_init_in_progress))
+ flush_workqueue(kmpath_handlerd);
multipath_wait_for_pg_init_completion(m);
- flush_workqueue(kmultipathd);
+ flush_work(&m->process_queued_bios);
flush_work(&m->trigger_event);
clear_bit(MPATHF_PG_INIT_DISABLED, &m->flags);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] multipath: flush workqueue only in necessary
2018-03-12 7:41 [RFC PATCH] multipath: flush workqueue only in necessary wuzhouhui
@ 2018-03-22 8:02 ` Changwei Ge
0 siblings, 0 replies; 2+ messages in thread
From: Changwei Ge @ 2018-03-22 8:02 UTC (permalink / raw)
To: wuzhouhui, dm-devel
Hi Zhouhui,
Your patch is not a formatted one.
At least, it should include Signed-off-by
Thanks,
Changwei
On 2018/3/12 15:47, wuzhouhui wrote:
> When flush works belong a specific multipath, we flush workqueue only
> in necessary.
>
> (That's my first time to send a patch, please remind me if anything
> wrong)
>
> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
> index f7810cc..0f14732 100644
> --- a/drivers/md/dm-mpath.c
> +++ b/drivers/md/dm-mpath.c
> @@ -1154,9 +1154,10 @@ static void flush_multipath_work(struct multipath *m)
> set_bit(MPATHF_PG_INIT_DISABLED, &m->flags);
> smp_mb__after_atomic();
>
> - flush_workqueue(kmpath_handlerd);
> + if (atomic_read(&m->pg_init_in_progress))
> + flush_workqueue(kmpath_handlerd);
> multipath_wait_for_pg_init_completion(m);
> - flush_workqueue(kmultipathd);
> + flush_work(&m->process_queued_bios);
> flush_work(&m->trigger_event);
>
> clear_bit(MPATHF_PG_INIT_DISABLED, &m->flags);
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-22 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 7:41 [RFC PATCH] multipath: flush workqueue only in necessary wuzhouhui
2018-03-22 8:02 ` Changwei Ge
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.