Re: [PATCH 3/5] dm-multipath: remove process_queued_ios()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/31/14 18:10, Hannes Reinecke wrote:
> @@ -1217,9 +1185,21 @@ static void pg_init_done(void *data, int errors)
>  
>  	if (!m->pg_init_required)
>  		m->queue_io = 0;
> -
> -	m->pg_init_delay_retry = delay_retry;
> -	queue_work(kmultipathd, &m->process_queued_ios);
> +	else {
> +		if (!pg_init_delay) {
> +			m->pg_init_delay_retry = 0;
> +			/*
> +			 * Add a small delay to move the
> +			 * activation to a workqueue
> +			 */
> +			pg_init_delay = HZ / 50;
> +		} else
> +			m->pg_init_delay_retry = 1;
> +		if (queue_delayed_work(kmpath_handlerd, &pgpath->activate_path,
> +				       pg_init_delay))
> +			m->pg_init_in_progress++;
> +		goto out;
> +	}

This code is called when pg_init_progress becomes 0,
that means it is possible that multiple pgpaths have requested retries.
So you have to activate_path for all non-active pgpath in this pg,
like __pg_init_all_paths() does in the current code.

Also, you aren't clearing pg_init_required here.
I think it causes extra pg_init unnecessarily.

What do you think if we just call __pg_init_all_paths() here
instead of open coding it?

-- 
Jun'ichi Nomura, NEC Corporation

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux