Re: 答复: Re: [PATCH] multipath-tools: improve processing efficiency for addition and deletion of multipath devices

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

 



Hello Tang,

> In the second case, we know all events in the sequence have the
> same
> > WWID; in this case I think it would be safe to filter away "remove"
> > events by subsequent "add" events, ending up with "add path1| add
> > path2| remove path3". But I may be overlooking something here.
> 
> > The dangerous thing if you have simultaneous remove and add events
> for
> > the same LUN is that processing the "add" events is likely to fail
> in
> > domap(). If you get "add path1 | remove path2", once you process
> "add
> > path1", "path2" may not exist in the kernel any more, and "domap"
> will
> > fail if you try to set up both; you may end up removing the map
> > completely. IMHO the only safe way to process events in this
> situation
> > is to merge the events into a single domap() call.
> 
> "case 2: remove path1 |add path1 |remove path2 |add path2 |remove
> path3"
> Since the mergering is starting from the latest to the eariest
> uevent,  so the
> uevent "remove path3" try to merger other uevents, if we do not stop
> mergering, 
> uevent "remove path3" would merge  uevent "remove path2" and uevent 
> "remove path1". Uevent "add  path2" would merge "add  path1". 
> The result is that we get two merged uevents:
> 1) add path2, path1
> 2) remove path3, path2, path1 

> Then we process the merged uevents from the earlier to later, We try
> to ”add 
> path2 path1“, and we would create or reload a map device with path1
> and path2. 
> Next we process ” remove path3, path2, path1“, so path1, path2 and
> path3 are 
> all removed from the map device, this is wrong,  the correct result
> is that the path1
> and path2 should be still in the map device.

I don't understand that. This would mean that you'd re-order "remove
path1 | add path1" into "add path1| remove path1", and the same for
path2. That may obviously never happen. Your "stop merging" logic
forbids it, and that's fine for me for now.

Regards
Martin

-- 
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

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