On Mon, Feb 12, 2018 at 05:18:02PM -0600, Benjamin Marzinski wrote:
> It is the DM_EXISTS_FLAG. It's defined in libdm/ioctl/libdm-iface.c in
> the lvm2 source.  It is unconditionally set on all dm control ioctls
> from libdevmapper by _do_dm_ioctl() (also in libdm/ioctl/libdm-iface.c).
> I don't know the reason for this. I don't see anything that uses it in
> driver/md/dm-ioctl.c, and I see that line in the libdm source has a
> /* FIXME */ next to it. On the other hand, all I'm trying to do here is
> run the same ioctl that libdevmapper would if it supported this command,
> and there may well be a reason for it that I'm missing.
  
DM_EXISTS_FLAG indicates that the device the ioctl referenced exists.

If you performed certain queries and the device was not found, you
got a successful return but without this flag.

In the dim and distant past this flag was handled kernel-side.  Later,
we dropped it but left that userspace code emulating it.  The FIXMEs
were just saying that the library code could be cleaned up too one day.
  Ref. https://lwn.net/Articles/38512/

Alasdair

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

Reply via email to