From: Zdenek Kabelac <zkabelac@redhat.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] libdm cannot swap names between two child volumes
Date: Thu, 04 Jun 2015 14:14:17 +0200 [thread overview]
Message-ID: <55704119.4000606@redhat.com> (raw)
In-Reply-To: <CAAYit8QCcaGvb5QPw_Xuk+oavthHR1c32oB0GsGd+Ypk0rPtRg@mail.gmail.com>
Dne 4.6.2015 v 12:02 M.H. Tsai napsal(a):
> Hi All,
>
> I found that there's a potential bug in libdm when I try to swap sub
> volume's name. By executing the following code, the function
> dm_tree_activate_children() will go into infinite loop since that
> _rename_conflict_exists() still reports "resolvable=1" in this case.
>
> logical_volume *parent = ...;
> logical_volume *child1 = seg_lv(parent, 0);
> logical_volume *child2 = seg_lv(parent, 1);
> char const *tmp = child1->name;
> child1->name = child2->name;
> child2->name = tmp;
> resume_lv(cmd, parent);
>
> Although this scenario might not happen through command-line
> operation, some programmers might need this feature. I think that this
> issue could be resolve in libdm by assigning a temporary name, as the
> following patch does. Is it safe to do this?
Please provide sequence of 'ioctl' where you think there is a bug.
(or disclose your code using libdm).
There are many rules behind the work with subLV.
(e.g. you can't operate on subLV without operating through top level LV
(and yes some parts of lvm2 code are still buggy in this regard...))
Regards
Zdenek
next prev parent reply other threads:[~2015-06-04 12:14 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 [this message]
2015-06-05 3:32 ` M.H. Tsai
2015-06-05 8:04 ` Zdenek Kabelac
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=55704119.4000606@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).