freebsd-skq/sys/fs
David Xu 5ff2bb52cc I am comparing current pipe code with the one in 8.3-STABLE r236165,
I found 8.3 is a history BSD version using socket to implement FIFO
pipe, it uses per-file seqcount to compare with writer generation
stored in per-pipe object. The concept is after all writers are gone,
the pipe enters next generation, all old readers have not closed the
pipe should get the indication that the pipe is disconnected, result
is they should get EPIPE, SIGPIPE or get POLLHUP in poll().
But newcomer should not know that previous writters were gone, it
should treat it as a fresh session.
I am trying to bring back FIFO pipe to history behavior. It is still
unclear that if single EOF flag can represent SBS_CANTSENDMORE and
SBS_CANTRCVMORE which socket-based version is using, but I have run
the poll regression test in tool directory, output is same as the one
on 8.3-STABLE now.
I think the output "not ok 18 FIFO state 6b: poll result 0 expected 1.
expected POLLHUP; got 0" might be bogus, because newcomer should not
know that old writers were gone. I got the same behavior on Linux.
Our implementation always return POLLIN for disconnected pipe even it
should return POLLHUP, but I think it is not wise to remove POLLIN for
compatible reason, this is our history behavior.

Regression test: /usr/src/tools/regression/poll
2012-07-31 05:48:35 +00:00
..
cd9660 Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
coda Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. 2012-04-17 16:28:22 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs Extend the KPI to lock and unlock f_offset member of struct file. It 2012-07-02 21:01:03 +00:00
ext2fs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
fdescfs Use NULL instead of 0 2012-03-13 10:04:13 +00:00
fifofs I am comparing current pipe code with the one in 8.3-STABLE r236165, 2012-07-31 05:48:35 +00:00
hpfs Use C99-style initialization for struct dirent in preparation for 2012-05-25 09:16:59 +00:00
msdosfs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
nandfs Catch a corner case where ssegs could be 0 and thus i would be 0 and 2012-05-28 16:33:58 +00:00
nfs A problem with the NFSv4 server was reported by Andrew Leonard 2012-05-17 21:52:17 +00:00
nfsclient Do not override an error from uiomove() with (non-)error result from 2012-07-02 09:53:08 +00:00
nfsserver Fix two cases in the new NFS server where a tsleep() is 2012-05-12 22:20:55 +00:00
ntfs Remove a check on MNTK_UPDATE that is not really necessary as it is 2012-07-10 00:23:25 +00:00
nullfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
nwfs Rename cache_lookup_times() to cache_lookup() and retire the old API and 2012-02-06 17:00:28 +00:00
portalfs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
procfs Add procfs to jail-mountable filesystems. 2012-02-29 00:30:18 +00:00
pseudofs Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs. 2012-03-05 11:38:02 +00:00
smbfs Simply error handling by moving the allocation of np down to where it is 2012-07-16 22:07:29 +00:00
tmpfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
udf Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
unionfs Skip directory entries with zero inode number during traversal. 2012-05-16 10:44:09 +00:00