Subject: kern/786: nullfs bogons when mmaping...
To: None <gnats-admin@NetBSD.ORG>
From: Herb Peyerl <Herb.Peyerl@sidney.novatel.ca>
List: netbsd-bugs
Date: 02/06/1995 21:50:05
>Number:         786
>Category:       kern
>Synopsis:       nullfs bogons when mmaping...
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb  6 21:50:03 1995
>Originator:     Herb Peyerl
>Organization:
hpeyerl@novatel.ca                           |  NovAtel Communications Ltd.
hpeyerl@beer.org                             | <nothing I say matters anyway>
              C++ is to C as Cancer is to Lung" (holloway)
>Release:        NetBSD-current Jan 13.
>Environment:
System: NetBSD sidney 1.0A NetBSD 1.0A (SIDNEY) #21: Sun Jan 22 07:44:38 MST 1995 hpeyerl@sidney:/usr/src/sys/arch/i386/compile/SIDNEY i386


>Description:

nullfs doesn't appear to like mmap'ing files properly... If you use 'vi' 
to append text to an existing file, the changes don't show up in a 
subsequent 'tail' or 'vi'.

>How-To-Repeat:
    mount_nullfs some directory to somewhere else.

	vi an existing file, add something to the end, write and quit.

	then 'tail' the file.  Your changes don't show up. Try to 'vi'
the file again, you get null's. 

E.G:

# ls -al t
-rw-r--r--  1 root  source  79 Feb  6 22:26 t
# cat t
this is a line.
this is another line.

this is yet another line added with vi.
# tail t
this is a line.
this is another line.
# vi t

this is a line.
this is another line.
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
~
~
~

# cp t z
# tail z
this is a line.
this is another line.

this is yet another line added with vi.


>Fix:

The only workaround I've been able to find is not to use nullfs. :-(
>Audit-Trail:
>Unformatted: