LWN.net Logo

Use libdevmapper with DM, not ioctl()

Use libdevmapper with DM, not ioctl()

Posted Apr 27, 2010 4:44 UTC (Tue) by CChittleborough (subscriber, #60775)
Parent article: Infrastructure unification in the block layer

Thanks for an interesting article. I'd like to add one point for people writing userland code: using ioctl() to talk to the device mapper is a Really Bad Idea. Use libdevmapper instead.

The device mapper's ioctl() interface is arcane and ugly, but libdevmapper hides all that, protecting your sanity, saving you effort and giving you source-level compatibility if the userland/DM interface ever changes.


(Log in to post comments)

Use libdevmapper with DM, not ioctl()

Posted Apr 27, 2010 9:09 UTC (Tue) by nix (subscriber, #2304) [Link]

... and since the userland/DM interface has already changed once (from a filesystem to an ioctl()) it seems wise to presume that it may change again.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds