<tt><font size=2>Hi Martin,</font></tt>
<br>
<br><font size=2>In your case, my action is:</font>
<br><font size=2>1) merger uevents 1) 2) to one uevent "add sda sdb",
and process them togother</font>
<br><font size=2>2) process uevent "del sda"</font>
<br><font size=2>3) process uevent "add sdc"</font>
<br><font size=2>4) process uevent "del sdb"</font>
<br><font size=2>5) process uevent "add sda"</font>
<br>
<br><font size=2>Though the processing efficiency in such scenario is lower
than yours, but it is simple and reliable,</font>
<div><font size=2>more importantly, Martin, you still focus on such special
scene, which I concerned is like this:</font>
<br><font size=2>UDEV  [19172.014482] add      /devices/platform/host3/session17/target3:0:0/3:0:0:0/block/sdc
(block)</font>
<br><font size=2>UDEV  [19172.249389] add      /devices/platform/host4/session18/target4:0:0/4:0:0:0/block/sdd
(block)</font>
<br><font size=2>UDEV  [19172.343791] add      /devices/platform/host3/session17/target3:0:0/3:0:0:2/block/sdf
(block)</font>
<br><font size=2>UDEV  [19172.364496] add      /devices/platform/host5/session19/target5:0:0/5:0:0:0/block/sdh
(block)</font>
<br><font size=2>UDEV  [19172.523794] add      /devices/platform/host4/session18/target4:0:0/4:0:0:2/block/sdi
(block)</font>
<br><font size=2>UDEV  [19172.621333] add      /devices/platform/host3/session17/target3:0:0/3:0:0:4/block/sdn
(block)</font>
<br><font size=2>UDEV  [19172.699473] add      /devices/platform/host4/session18/target4:0:0/4:0:0:1/block/sdg
(block)</font>
<br><font size=2>UDEV  [19172.704605] add      /devices/platform/host3/session17/target3:0:0/3:0:0:1/block/sde
(block)</font>
<br><font size=2>UDEV  [19172.709687] add      /devices/platform/host3/session17/target3:0:0/3:0:0:3/block/sdj
(block)</font>
<br><font size=2>UDEV  [19172.714919] add      /devices/platform/host4/session18/target4:0:0/4:0:0:3/block/sdl
(block)</font>
<br><font size=2>UDEV  [19172.728891] add      /devices/platform/host4/session18/target4:0:0/4:0:0:4/block/sdo
(block)</font>
<br><font size=2>UDEV  [19172.872156] add      /devices/platform/host3/session17/target3:0:0/3:0:0:6/block/sdt
(block)</font>
<br><font size=2>UDEV  [19172.915542] add      /devices/platform/host4/session18/target4:0:0/4:0:0:6/block/sdu
(block)</font>
<br><font size=2>UDEV  [19173.086935] add      /devices/platform/host6/session20/target6:0:0/6:0:0:0/block/sdw
(block)</font>
<br><font size=2>UDEV  [19173.108278] add      /devices/platform/host6/session20/target6:0:0/6:0:0:1/block/sdz
(block)</font>
<br><font size=2>UDEV  [19173.195153] add      /devices/platform/host4/session18/target4:0:0/4:0:0:5/block/sdr
(block)</font>
<br><font size=2>UDEV  [19173.228397] add      /devices/platform/host3/session17/target3:0:0/3:0:0:5/block/sdq
(block)</font>
<br><font size=2>UDEV  [19173.363632] add      /devices/platform/host5/session19/target5:0:0/5:0:0:2/block/sdm
(block)</font>
<br><font size=2>UDEV  [19173.386560] add      /devices/platform/host3/session17/target3:0:0/3:0:0:7/block/sdx
(block)</font>
<br><font size=2>UDEV  [19173.394515] add      /devices/platform/host4/session18/target4:0:0/4:0:0:7/block/sdy
(block)</font>
<br><font size=2>UDEV  [19173.410152] add      /devices/platform/host5/session19/target5:0:0/5:0:0:1/block/sdk
(block)</font>
<br><font size=2>UDEV  [19173.474286] add      /devices/platform/host6/session20/target6:0:0/6:0:0:2/block/sdab
(block)</font>
<br><font size=2>UDEV  [19173.508438] add      /devices/platform/host5/session19/target5:0:0/5:0:0:3/block/sdp
(block)</font>
<br><font size=2>UDEV  [19173.713146] add      /devices/platform/host5/session19/target5:0:0/5:0:0:4/block/sds
(block)</font>
<br><font size=2>UDEV  [19173.782065] add      /devices/platform/host5/session19/target5:0:0/5:0:0:5/block/sdv
(block)</font>
<br><font size=2>UDEV  [19173.787447] add      /devices/platform/host5/session19/target5:0:0/5:0:0:6/block/sdaa
(block)</font>
<br><font size=2>UDEV  [19173.803218] add      /devices/platform/host6/session20/target6:0:0/6:0:0:3/block/sdad
(block)</font>
<br><font size=2>UDEV  [19173.849411] add      /devices/platform/host5/session19/target5:0:0/5:0:0:7/block/sdac
(block)</font>
<br><font size=2>UDEV  [19173.918301] add      /devices/platform/host6/session20/target6:0:0/6:0:0:5/block/sdaf
(block)</font>
<br><font size=2>UDEV  [19173.941005] add      /devices/platform/host6/session20/target6:0:0/6:0:0:4/block/sdae
(block)</font>
<br><font size=2>UDEV  [19173.987206] add      /devices/platform/host6/session20/target6:0:0/6:0:0:7/block/sdah
(block)</font>
<br><font size=2>UDEV  [19173.992431] add      /devices/platform/host6/session20/target6:0:0/6:0:0:6/block/sdag
(block)</font>
<br>
<br><font size=2>Or like this:</font>
<br><font size=2>UDEV  [20712.402631] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:0/block/sdc
(block)</font>
<br><font size=2>UDEV  [20712.427716] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:0/block/sdw
(block)</font>
<br><font size=2>UDEV  [20712.459854] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:0/block/sdd
(block)</font>
<br><font size=2>UDEV  [20712.471124] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:0/block/sdh
(block)</font>
<br><font size=2>UDEV  [20712.492190] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:1/block/sdz
(block)</font>
<br><font size=2>UDEV  [20712.495245] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:1/block/sdg
(block)</font>
<br><font size=2>UDEV  [20712.512007] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:1/block/sde
(block)</font>
<br><font size=2>UDEV  [20712.522986] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:1/block/sdk
(block)</font>
<br><font size=2>UDEV  [20712.528676] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:2/block/sdab
(block)</font>
<br><font size=2>UDEV  [20712.529891] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:2/block/sdm
(block)</font>
<br><font size=2>UDEV  [20712.536178] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:2/block/sdi
(block)</font>
<br><font size=2>UDEV  [20712.545444] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:3/block/sdl
(block)</font>
<br><font size=2>UDEV  [20712.548006] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:3/block/sdj
(block)</font>
<br><font size=2>UDEV  [20712.551935] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:3/block/sdp
(block)</font>
<br><font size=2>UDEV  [20712.555405] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:2/block/sdf
(block)</font>
<br><font size=2>UDEV  [20712.556947] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:4/block/sdo
(block)</font>
<br><font size=2>UDEV  [20712.563524] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:4/block/sds
(block)</font>
<br><font size=2>UDEV  [20712.572948] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:4/block/sdae
(block)</font>
<br><font size=2>UDEV  [20712.574738] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:3/block/sdad
(block)</font>
<br><font size=2>UDEV  [20712.576736] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:5/block/sdr
(block)</font>
<br><font size=2>UDEV  [20712.581343] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:4/block/sdn
(block)</font>
<br><font size=2>UDEV  [20712.583883] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:5/block/sdq
(block)</font>
<br><font size=2>UDEV  [20712.604498] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:5/block/sdaf
(block)</font>
<br><font size=2>UDEV  [20712.605536] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:6/block/sdu
(block)</font>
<br><font size=2>UDEV  [20712.605721] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:6/block/sdt
(block)</font>
<br><font size=2>UDEV  [20712.606517] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:5/block/sdv
(block)</font>
<br><font size=2>UDEV  [20712.610709] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:6/block/sdaa
(block)</font>
<br><font size=2>UDEV  [20712.618187] remove   /devices/platform/host4/session18/target4:0:0/4:0:0:7/block/sdy
(block)</font>
<br><font size=2>UDEV  [20712.628520] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:6/block/sdag
(block)</font>
<br><font size=2>UDEV  [20712.642216] remove   /devices/platform/host5/session19/target5:0:0/5:0:0:7/block/sdac
(block)</font>
<br><font size=2>UDEV  [20712.643796] remove   /devices/platform/host3/session17/target3:0:0/3:0:0:7/block/sdx
(block)</font>
<br><font size=2>UDEV  [20712.653786] remove   /devices/platform/host6/session20/target6:0:0/6:0:0:7/block/sdah
(block)</font>
<br>
<br><font size=2>These scenarios are more realistic and more urgently requested
to be solved.</font>
<br>
<br><tt><font size=2>Regards,<br>
Tang</font></tt>
<br>
<br>
<div>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">发件人:    
    </font><font size=1 face="sans-serif">Martin Wilck
<mwilck@suse.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">收件人:    
    </font><font size=1 face="sans-serif">tang.junhui@zte.com.cn,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">抄送:    
   </font><font size=1 face="sans-serif">dm-devel@redhat.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">日期:    
    </font><font size=1 face="sans-serif">2016/11/18
15:40</font>
<br><font size=1 color=#5f5f5f face="sans-serif">主题:    
   </font><font size=1 face="sans-serif">Re: Re: [dm-devel]
Improve processing efficiency for addition and deletion of multipath devices</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi Tang,<br>
<br>
On Fri, 2016-11-18 at 09:02 +0800, tang.junhui@zte.com.cn wrote:<br>
> <br>
> we are more concerned <br>
>    about the more common situation like addition or deletion
devices<br>
> when <br>
>    iSCSI login/logout or FC link up/down with many iSCSI
or FC links<br>
> in <br>
>    each LUN. At this situation we may receive many uevents
from<br>
> different <br>
>    paths of the same LUN device, we want merge these uevents
to one<br>
> and <br>
>    process them together. <br>
<br>
I'm not arguing against that. But consider what you'd do if you have to<br>
process the series of uevents [ 1 "add sda", 2 "add sdb",
3 "del sda",<br>
4 "add sdc", 5 "del sdb", 6 "add sda" ].
If you merge these, assuming<br>
all belong to the same multipath map, what would be your action? I<br>
would set up a map with sda and sdc, using the device properties from<br>
event 4 and 6. That means that the rest of the events has been<br>
"filtered" out. All else would mean repeated map loads for the
same<br>
multipath map, which is what we want to avoid. Agreed?<br>
<br>
Regards,<br>
Martin<br>
<br>
-- <br>
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107<br>
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton<br>
HRB 21284 (AG Nürnberg)<br>
<br>
</font></tt>
<br></div></div>