Skip to contentSkip to conversation

DM kernel interface

DISCUSSION Allen Jack 3 participants 3 messages Jan 15, 2009 – Jan 16, 2009 Device mapper

lore
Share & tools
lore

Allen Jack

author
#0 lore raw

I have used the ioctl interface to create dm objects and get information about dm objects from a user space application, and am familiar with it. I am now required to get the object information from kernel space, and was wondering what interface is available to do that directly.

Is there a direct device mapper interface in kernel space that I can use to get the object information from? For example, I need to see the target mappings within a linear object.

Allen Jack
Sr. Software Engineer
[email protected]
(801) 861-5923
Novell, Inc.
Making IT Work As One
www.novell.com

#1 lore raw
Quoted 3 lines · Allen Jack

Is there a direct device mapper interface in kernel space that I can use to get the object information from? For example, I need to see the target mappings within a linear object.

#include <linux/device-mapper.h>

(But why do you need to do this?)

Alasdair

Signature · 1 line
[email protected]
maintainer
#2 lore raw
In reply to Allen Jack
Quoted 9 lines · Allen Jack

I have used the ioctl interface to create dm objects and get information about dm objects from a user space application, and am familiar with it. I am now required to get the object information from kernel space, and was wondering what interface is available to do that directly.

Is there a direct device mapper interface in kernel space that I can use to get the object information from? For example, I need to see the target mappings within a linear object.

Quoted 7 lines

Allen Jack
Sr. Software Engineer
[email protected]
(801) 861-5923
Novell, Inc.
Making IT Work As One
www.novell.com

Hi

You can call the same ioctls from kernel space as well, see ioctl_by_bdev.

Calling device mapper functions defined in <linux/device-mapper.h> directly is discouraged if you are not developing dm target driver.

Mikulas