From: Martin Wilck <mwilck@suse.com>
To: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH 00/10] fixes for kpartx -d
Date: Sat, 06 May 2017 00:36:19 +0200 [thread overview]
Message-ID: <1494023779.4926.4.camel@suse.com> (raw)
In-Reply-To: <1494023438.4926.2.camel@suse.com>
On Sat, 2017-05-06 at 00:30 +0200, Martin Wilck wrote:
> On Fri, 2017-05-05 at 23:18 +0100, Alasdair G Kergon wrote:
> > On Sat, May 06, 2017 at 12:05:49AM +0200, Martin Wilck wrote:
> > > 3) kpartx should only delete "partitions", which are single-
> > > target
> > > linear mappings into a block device. Other maps should not
> > > be
> > > touched.
> >
> > The prefix on the dm device's uuid should guarantee this: all
> > devices
> > kpartx creates should have the same initial characters (a
> > not-quite-standard form "part" IIRC instead of "KPARTX-") and any
> > devices without those initial characters must be ignored.
>
> This works only for partitions on DM devices, not e.g. for loop
> devices. These devices obviously have no DM UUID; and thus kpartx
> also
> doesn't set an UUID for the partition devices it creates.
> That's the main point of this series.
Moreover: before even looking at the UUID, kpartx discards mappings
that are not "linear" and don't map into the device in question. I
added the additional case that it should also disregard mappings with
two or more targets which can't be regarded as simple "linear" type
(but in the current code, they are).
With the UUID test in place, this may seem kind of redundant, but it
follows the general logic that obvious non-partition devices should be
discarded before checking the UUID.
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
next prev parent reply other threads:[~2017-05-05 22:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 22:05 [PATCH 00/10] fixes for kpartx -d Martin Wilck
2017-05-05 22:05 ` [PATCH 01/10] kpartx: test-kpartx: new unit test program Martin Wilck
2017-05-05 22:05 ` [PATCH 02/10] kpartx: avoid ioctl error for loop devices Martin Wilck
2017-05-08 20:46 ` Benjamin Marzinski
2017-05-11 9:33 ` Martin Wilck
2017-05-05 22:05 ` [PATCH 03/10] kpartx: remove is_loop_device Martin Wilck
2017-05-05 22:05 ` [PATCH 04/10] kpartx: dm_remove_partmaps: support non-dm devices Martin Wilck
2017-05-05 22:05 ` [PATCH 05/10] kpartx: dm_devn: return error for non-existent device Martin Wilck
2017-05-05 22:05 ` [PATCH 06/10] kpartx: don't treat multi-linear mappings as partitions Martin Wilck
2017-05-05 22:05 ` [PATCH 07/10] libmultipath: " Martin Wilck
2017-05-05 22:05 ` [PATCH 08/10] kpartx: use partition UUID for non-DM devices Martin Wilck
2017-05-05 22:30 ` Alasdair G Kergon
2017-05-08 8:01 ` Martin Wilck
2017-05-05 22:05 ` [PATCH 09/10] kpartx: use absolute path for regular files Martin Wilck
2017-05-05 22:05 ` [PATCH 10/10] kpartx: find_loop_by_file: use sysfs Martin Wilck
2017-05-05 22:18 ` [PATCH 00/10] fixes for kpartx -d Alasdair G Kergon
2017-05-05 22:30 ` Martin Wilck
2017-05-05 22:36 ` Martin Wilck [this message]
2017-05-08 6:33 ` Hannes Reinecke
2017-05-08 7:47 ` Martin Wilck
2017-05-08 7:54 ` Martin Wilck
2017-05-08 22:21 ` Benjamin Marzinski
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=1494023779.4926.4.camel@suse.com \
--to=mwilck@suse.com \
--cc=agk@redhat.com \
--cc=dm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.