lkml.org 
[lkml]   [2008]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] An alternative interface to device mapper
Date
Hi Pavel,

On Saturday 08 March 2008 03:38, Pavel Machek wrote:
> > Unlike a pipe, there is no waiting for input on a ddlink: if there is
> > nothing to read then the read returns immediately with zero length. If
> > some other behavior is desired it can be obtained using poll.
>
> That's kind of strange, no?

It doesn't feel strange in practice. The ddlink framework itself does
not implement this, the module does (e.g. ddsetup). So you can put a
poll wait in your read method if that suits your interface. It just
does not seem to be useful for ddsetup, which does not produce any
data of the kind that needs an application to sit in a loop waiting for
something to arrive. If there is an application like that, it would
probably want to poll the ddlink anyway, to avoid having a whole thread
dedicated to just that.

Maybe the reason it does not feel strange to omit the wait is, reading
from proc never waits. A ddlink fd is more like proc than like a pipe.
It was Trond who started called his thing a "pipefs", blame him ;-)

> Should not description of interface go to Doc* somewhere?

Yes, will fix.

Daniel


\
 
 \ /
  Last update: 2008-03-08 13:09    [W:0.060 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site