From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: dm: introduce DM_GET_TARGET_VERSION Date: Tue, 17 Sep 2019 10:06:32 -0400 Message-ID: <20190917140632.GA3728@redhat.com> References: <20190916180107.GA725@infradead.org> <127b8c4e-a6dc-6d5e-caff-fe1a0ca3a5bb@gmail.com> Reply-To: LVM2 development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: lvm-devel-bounces@redhat.com Errors-To: lvm-devel-bounces@redhat.com To: John Dorminy Cc: lvm-devel@redhat.com, Christoph Hellwig , device-mapper development , Zdenek Kabelac , Milan Broz List-Id: dm-devel.ids On Tue, Sep 17 2019 at 9:56am -0400, John Dorminy 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Date: Tue, 17 Sep 2019 10:06:32 -0400 Subject: dm: introduce DM_GET_TARGET_VERSION In-Reply-To: References: <20190916180107.GA725@infradead.org> <127b8c4e-a6dc-6d5e-caff-fe1a0ca3a5bb@gmail.com> Message-ID: <20190917140632.GA3728@redhat.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Sep 17 2019 at 9:56am -0400, John Dorminy 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.