From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] libdm cannot swap names between two child volumes
Date: Fri, 05 Jun 2015 10:04:33 +0200 [thread overview]
Message-ID: <55715811.8020706@redhat.com> (raw)
In-Reply-To: <CAAYit8T2YTHCrGf2rPYdQUTQOGn3uZVQkEkJ-DCbj+9iovRw+g@mail.gmail.com>
Dne 5.6.2015 v 05:32 M.H. Tsai napsal(a):
> 2015-06-04 20:14 GMT+08:00 Zdenek Kabelac <zkabelac@redhat.com>:
>> Please provide sequence of 'ioctl' where you think there is a bug.
>> (or disclose your code using libdm).
>
> Assume that there's a top-level LV "lv1",
> and two sub-LVs "lv1_child1" and "lv1_child2".
> The table of the top-level LV is "0 1234 my-target-type 253:1 253:2",
> as following:
>
> # dmsetup ls --tree
> vg1-lv1 (253:3)
> ├─ vg1-lv1_child1 (253:1)
> └─ vg1-lv2_child2 (253:2)
The problem with rename is -
you have device 'lv1' you rename it to 'lv2' - yet
those who opened device with the name 'lv1' still thinks
the 'lv1' device exits.
So for safety reason before you 'reuse' any existing name in-use,
there should be 'deactivating' such device first - so there is no 'race' in
name usage.
It's even possible we miss to track full history of active renamed device.
Since you get into strange scenarios when you start to count
with udev event handling and link generating here - it's getting nearly
impossible to synchronize this properly...
Zdenek
next prev parent reply other threads:[~2015-06-05 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 10:02 [linux-lvm] libdm cannot swap names between two child volumes M.H. Tsai
2015-06-04 12:14 ` Zdenek Kabelac
2015-06-05 3:32 ` M.H. Tsai
2015-06-05 8:04 ` Zdenek Kabelac [this message]
2015-06-08 2:09 ` M.H. Tsai
2015-06-08 7:17 ` Zdenek Kabelac
2015-06-11 2:54 ` M.H. Tsai
2015-06-11 7:46 ` Zdenek Kabelac
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=55715811.8020706@redhat.com \
--to=zkabelac@redhat.com \
--cc=linux-lvm@redhat.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;
as well as URLs for NNTP newsgroup(s).