Re: Question about dmevents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 20, 2007 at 06:14:04PM +0100, Alasdair G Kergon wrote:
> On Fri, Jul 20, 2007 at 09:57:28AM -0700, Wood, Brian J wrote:
> > Hi Alasdair, I also read in the definition of DM_DEV_CREATE that the
> > uuid is optional. Since that is the case shouldn't the failure for not
> > having a uuid in "_alloc_thread_status()" be taken out?
>  
> I don't know this code, but in general userspace code should use uuid if it is
> present.  If it isn't, it should fall back to using the name.  Whether that
> leads to sensible behaviour in this particular case, I don't know.  If it
> doesn't then it should be documented that uuid is a requirement.

Yes, the uuid here is a requirement, since it is what is used for
communication between dmeventd and other userspace components. Using
device names is, in my opinion, prone to races and therefore not quite
suitable for dmeventd. Moreover, since the dmeventd -only- gets the
uuid (from whichever other application it tries to get it), it cannot
fall back to name, not knowing it.

In fact, when using theh libdevmapper-event library, the client-side
code should already fail, if a device has no uuid. In practice, this
means that uuid-less devices cannot be monitored, but that is probably
a case that is not really important (or is it?).

I would probably prefer to just document this as requirement and keep
things as they are. Comments?

Yours, Peter.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation

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

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux