All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: John Dorminy <jdorminy@redhat.com>
Cc: lvm-devel@redhat.com, Christoph Hellwig <hch@infradead.org>,
	device-mapper development <dm-devel@redhat.com>,
	Zdenek Kabelac <zkabelac@redhat.com>,
	Milan Broz <gmazyland@gmail.com>
Subject: Re: dm: introduce DM_GET_TARGET_VERSION
Date: Tue, 17 Sep 2019 10:06:32 -0400	[thread overview]
Message-ID: <20190917140632.GA3728@redhat.com> (raw)
In-Reply-To: <CAMeeMh9t4LBwJn_CPQgFNa_Tyj22fJYHK-4qAnyn0RXm9RzCnw@mail.gmail.com>

On Tue, Sep 17 2019 at  9:56am -0400,
John Dorminy <jdorminy@redhat.com> wrote:

>    I'm confused here:

>    >...and then it fails on activation because DM table load detects old (or
>    missing) dm-crypt feature.
>    >(There was no way to get dm target version before table load if module is
>    not loaded.)
>    >And I tried to avoid modprobe calls from libcryptsetup.
> 
>    I'm not understanding how this could work. Let's say there's a module
>    providing target 'splice' which is currently unloaded. Then `dmsetup
>    target-version splice` is unaware of the splice target, and thus reports
>    nothing. So in order to get the proper version number, we do have to do a
>    modprobe first.
>    But, if the module providing splice *is* already loaded, `dmsetup targets`
>    will report splice's version number already, so `dmsetup target-version
>    splice` is a convenience instead of parsing `dmsetup targets` output?

dm_get_target_type() loads the requested module.  No userspace modprobe
needed.

--
lvm-devel mailing list
lvm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel

WARNING: multiple messages have this Message-ID (diff)
From: Mike Snitzer <snitzer@redhat.com>
To: lvm-devel@redhat.com
Subject: dm: introduce DM_GET_TARGET_VERSION
Date: Tue, 17 Sep 2019 10:06:32 -0400	[thread overview]
Message-ID: <20190917140632.GA3728@redhat.com> (raw)
In-Reply-To: <CAMeeMh9t4LBwJn_CPQgFNa_Tyj22fJYHK-4qAnyn0RXm9RzCnw@mail.gmail.com>

On Tue, Sep 17 2019 at  9:56am -0400,
John Dorminy <jdorminy@redhat.com> wrote:

>    I'm confused here:

>    >...and then it fails on activation because DM table load detects old (or
>    missing) dm-crypt feature.
>    >(There was no way to get dm target version before table load if module is
>    not loaded.)
>    >And I tried to avoid modprobe calls from libcryptsetup.
> 
>    I'm not understanding how this could work. Let's say there's a module
>    providing target 'splice' which is currently unloaded. Then `dmsetup
>    target-version splice` is unaware of the splice target, and thus reports
>    nothing. So in order to get the proper version number, we do have to do a
>    modprobe first.
>    But, if the module providing splice *is* already loaded, `dmsetup targets`
>    will report splice's version number already, so `dmsetup target-version
>    splice` is a convenience instead of parsing `dmsetup targets` output?

dm_get_target_type() loads the requested module.  No userspace modprobe
needed.



  reply	other threads:[~2019-09-17 14:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  9:55 [PATCH] dm: introduce DM_GET_TARGET_VERSION Mikulas Patocka
2019-09-16  9:55 ` Mikulas Patocka
2019-09-16  9:58 ` [PATCH] lvm: " Mikulas Patocka
2019-09-16  9:58   ` Mikulas Patocka
2019-09-16 14:21 ` dm: " Mike Snitzer
2019-09-16 14:21   ` Mike Snitzer
2019-09-16 18:01 ` [PATCH] " Christoph Hellwig
2019-09-16 18:01   ` [dm-devel] " Christoph Hellwig
2019-09-16 18:16   ` Milan Broz
2019-09-16 18:16     ` [dm-devel] " Milan Broz
2019-09-17  6:32     ` Christoph Hellwig
2019-09-17  6:32       ` [dm-devel] " Christoph Hellwig
2019-09-17 13:39       ` Mike Snitzer
2019-09-17 13:39         ` Mike Snitzer
2019-09-17 13:56     ` [PATCH] " John Dorminy
2019-09-17 13:56       ` [dm-devel] " John Dorminy
2019-09-17 14:06       ` Mike Snitzer [this message]
2019-09-17 14:06         ` Mike Snitzer
2019-09-17 15:38         ` Mikulas Patocka
2019-09-17 15:38           ` Mikulas Patocka
2019-09-17 15:44           ` John Dorminy
2019-09-17 15:44             ` John Dorminy
2019-09-17 20:08             ` Mike Snitzer
2019-09-17 20:08               ` Mike Snitzer

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=20190917140632.GA3728@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=gmazyland@gmail.com \
    --cc=hch@infradead.org \
    --cc=jdorminy@redhat.com \
    --cc=lvm-devel@redhat.com \
    --cc=zkabelac@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.