[dm-devel] [RFC PATCH] multipath: flush workqueue only in necessary

Changwei Ge ge.changwei at h3c.com
Thu Mar 22 08:02:48 UTC 2018


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 at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
> 




More information about the dm-devel mailing list