RE: patch to discovery.c to stillgetpathpriorityforpaths with path state of PATH_DOWN

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

 



On Wednesday, November 15, 2006 6:10 PM, Dave Wysochanski wrote:

> On Wed, 2006-11-15 at 17:48 -0500, Edward Goggin wrote:
> > OK.  I was trying not to have to introduce another
> > prio state because that approach just seems prone
> > to error.
> > 
> > I'll give it a try tomorrow.
> > 
> 
> Ed has a point.
> 
> An effect of using the special value approach over the flag is a
> potential conflict with the callouts using the same values.  The flag
> approach isolates his initialization case better.

That's OK I think.  I like this approach better since it seems cleaner
as long as the callouts stay away from PRIO_UNDEF literal (-1).

I tested with inactive snapshots and just have one minor (but important)
adjustment to what is in source control at the moment.

diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index f21e5bc..6f2059a 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -706,7 +706,7 @@ pathinfo (struct path *pp, vector hwtabl
 	  * been successfully obtained before.
 	  */
 	if (mask & DI_PRIO &&
-	    (pp->state != PATH_DOWN || pp->priority != PRIO_UNDEF))
+	    (pp->state != PATH_DOWN || pp->priority == PRIO_UNDEF))
 		get_prio(pp);
 
 	if (mask & DI_WWID && !strlen(pp->wwid))

--
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