From: <tang.junhui@zte.com.cn>
To: mwilck@suse.com
Cc: dm-devel@redhat.com
Subject: Re: 答复: Re: [PATCH] multipath-tools: improve processing efficiency for addition and deletion of multipath devices
Date: Tue, 21 Feb 2017 13:34:10 +0800 (CST) [thread overview]
Message-ID: <201702211334103169589@zte.com.cn> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 2834 bytes --]
Hello Martin,
This exmaple shows why we need to stop merging,
Yes, It's fine since we have "stop merging" in current code.
RegardsTang
原始邮件
发件人: <mwilck@suse.com>
收件人: <dm-devel@redhat.com>
日 期 :2017年02月20日 19:24
主 题 :Re: [dm-devel] 答复: Re: [PATCH] multipath-tools: improve processing efficiency for addition and deletion of multipath devices
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@suse.com>, 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@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[-- Attachment #1.1.2: Type: text/html , Size: 6291 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next reply other threads:[~2017-02-21 5:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 5:34 tang.junhui [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-02-17 3:24 答复: Re: [PATCH] multipath-tools: improve processing efficiency for addition and deletion of multipath devices tang.junhui
2017-02-17 6:32 ` Benjamin Marzinski
2017-02-17 11:40 ` Martin Wilck
2017-02-20 11:08 ` Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201702211334103169589@zte.com.cn \
--to=tang.junhui@zte.com.cn \
--cc=dm-devel@redhat.com \
--cc=mwilck@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox