diff mbox

dm mpath: Skip calling activate_path if the path is already failed

Message ID E463DF2B2E584B4A82673F53D62C2EF46F2BA886@cosmail01.lsi.com (mailing list archive)
State Superseded, archived
Delegated to: Alasdair Kergon
Headers show

Commit Message

babu moger July 29, 2009, 3:46 p.m. UTC
This patch adds a check to skip failed paths while calling activate_path. If the path is already failed then activate_path will fail for sure. We don't have to call in that case.    

Signed-off-by: Babu Moger <babu.moger@lsi.com>
---





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

Comments

babu moger Aug. 14, 2009, 4:39 p.m. UTC | #1
Alasdair, Can you please pick up this patch in your next update..

Hannes, Any comments from you? I know you have already reviewed this in another thread.

Thanks
Babu Moger 

> -----Original Message-----
> From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com] On
> Behalf Of Moger, Babu
> Sent: Wednesday, July 29, 2009 10:47 AM
> To: dm-devel@redhat.com
> Subject: [dm-devel] [PATCH] dm mpath: Skip calling activate_path if the
> path is already failed
> 
> This patch adds a check to skip failed paths while calling activate_path.
> If the path is already failed then activate_path will fail for sure. We
> don't have to call in that case.
> 
> Signed-off-by: Babu Moger <babu.moger@lsi.com>
> ---
> 
> 
> --- linux-2.6.31-rc3/drivers/md/dm-mpath.c.orig	2009-07-27
> 10:30:39.000000000 -0500
> +++ linux-2.6.31-rc3/drivers/md/dm-mpath.c	2009-07-27
> 10:35:50.000000000 -0500
> @@ -454,6 +454,10 @@ static void process_queued_ios(struct wo
>  		m->pg_init_count++;
>  		m->pg_init_required = 0;
>  		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
> +			/* Skip failed paths */
> +			if (!tmp->is_active)
> +				continue;
> +
>  			if (queue_work(kmpath_handlerd, &tmp->activate_path))
>  				m->pg_init_in_progress++;
>  		}
> 
> 
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Hannes Reinecke Aug. 17, 2009, 6:20 a.m. UTC | #2
Moger, Babu wrote:
> Alasdair, Can you please pick up this patch in your next update..
> 
> Hannes, Any comments from you? I know you have already reviewed this in another thread.
> 
> Thanks
> Babu Moger 
> 
>> -----Original Message-----
>> From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com] On
>> Behalf Of Moger, Babu
>> Sent: Wednesday, July 29, 2009 10:47 AM
>> To: dm-devel@redhat.com
>> Subject: [dm-devel] [PATCH] dm mpath: Skip calling activate_path if the
>> path is already failed
>>
>> This patch adds a check to skip failed paths while calling activate_path.
>> If the path is already failed then activate_path will fail for sure. We
>> don't have to call in that case.
>>
>> Signed-off-by: Babu Moger <babu.moger@lsi.com>
>> ---
>>
>>
>> --- linux-2.6.31-rc3/drivers/md/dm-mpath.c.orig	2009-07-27
>> 10:30:39.000000000 -0500
>> +++ linux-2.6.31-rc3/drivers/md/dm-mpath.c	2009-07-27
>> 10:35:50.000000000 -0500
>> @@ -454,6 +454,10 @@ static void process_queued_ios(struct wo
>>  		m->pg_init_count++;
>>  		m->pg_init_required = 0;
>>  		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
>> +			/* Skip failed paths */
>> +			if (!tmp->is_active)
>> +				continue;
>> +
>>  			if (queue_work(kmpath_handlerd, &tmp->activate_path))
>>  				m->pg_init_in_progress++;
>>  		}
>>
>>
>>
>> --
>> dm-devel mailing list
>> dm-devel@redhat.com
>> https://www.redhat.com/mailman/listinfo/dm-devel
Patch is fine. And, indeed, we really should be adding it.

Acked-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox

Patch

--- linux-2.6.31-rc3/drivers/md/dm-mpath.c.orig	2009-07-27 10:30:39.000000000 -0500
+++ linux-2.6.31-rc3/drivers/md/dm-mpath.c	2009-07-27 10:35:50.000000000 -0500
@@ -454,6 +454,10 @@  static void process_queued_ios(struct wo
 		m->pg_init_count++;
 		m->pg_init_required = 0;
 		list_for_each_entry(tmp, &pgpath->pg->pgpaths, list) {
+			/* Skip failed paths */
+			if (!tmp->is_active)
+				continue;
+			
 			if (queue_work(kmpath_handlerd, &tmp->activate_path))
 				m->pg_init_in_progress++;
 		}