bsd-xfs, signaling to break a wait

Robert Watson robert at cyrus.watson.org
Tue Mar 30 19:32:43 CEST 1999


On 29 Mar 1999, Love wrote:

> Robert Watson <robert at cyrus.watson.org> writes:
> 
> > Arla Folk,
> > 
> > I've been playing with XFS some over the last week or so.  I ran into the
> > following behavior:
> 
> I assume your're using the BSD xfs.

Yup -- BSD xfs on 4.0-CURRENT of FreeBSD

> I see what you are trying to say, but since all (t)sleepings are done
> by each separate process and the sleepings are independent from each other.
> (see xfs_message.c:xfs_message_rpc()).

I observed this behavior specifically on the xfs_message_getroot call--for
a first pass, I just wrote a small program that listened on /dev/xfs0.  It
would read messages from it, but never respond.  I observed that when this
was the case, the interrupt behavior I described occurred.  I'll try it on
other calls once I get a few more of them working.

> When I tried it on my fbsd2.2.x host I hade to press C-c twice for some odd
> reson I don't have time to figure out now. But it worked independely in
> what order I killed them.
> 
> Would help if you could give us a testcase that (didn't) worked.
> 
> We do ignore SIGIO during the rpc, but that is only because emacs
> tab-completion breaks if we don't.

I notice that the rpc to userland is frequently used, but there appears to
be matching userland code for an rpc to the kernel that is unused.  Is
that observation correct, or is it in use?

Also, the BSD xfs kernel module appears to implement blocking only on
select(), not on read() when the file descriptor is set as blocking.  I
was wondering what the reasoning was there, or if it was just that you
never do that so didn't implement it? :-)  A

while (1) {
	i = read(kernelfd, buf, buflen);
	printf("%d\n", i);
}

returns a continuous stream of 0's as opposed to blocking, leading to some
surprise on my first pass at using it :-).

  Robert N Watson 

robert at fledge.watson.org              http://www.watson.org/~robert/
PGP key fingerprint: 03 01 DD 8E 15 67 48 73  25 6D 10 FC EC 68 C1 1C

Carnegie Mellon University            http://www.cmu.edu/
TIS Labs at Network Associates, Inc.  http://www.tis.com/
Safeport Network Services             http://www.safeport.com/






More information about the Arla-drinkers mailing list