On Wed, Nov 13, 2002 at 03:28:22PM -0800, Terry Lambert wrote: +> Don't worry about it. It's only a problem for mmap'ed files +> which are also read/written. Sheesh.
I have found one little bug in nullfs. I've send it some time ago
to hackers@, but without any respond.
Here it is, maybe someone could check it:
-----[ start mail ]-----
I have found something like this, but I'm not sure of this
is a bug in nullfs:
# cd
# mkdir dir1
# mkdir dir1/dir2
# mkdir dir3
# mount_null dir1 dir3
Now simple proram "test":
-----[ start ]-----
#include <sys/param.h>
#include <sys/syscall.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
int
main(int argc, char *argv[])
{
char buf[MAXPATHLEN];
/* I just want to be sure that I'm calling syscall directly. */
if (syscall(SYS___getcwd, buf, sizeof buf) != 0) {
fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
exit(1);
}
printf("out: [%s]\n", buf);
exit(0);
}
-----[ end ]-----
And now:
# cd ~/dir3/dir1
# /path/to/test
/path/to/test: Not a directory
Problem is here (line 571 in /sys/kern/vfs_cache.c):
if (vp->v_dd->v_id != vp->v_ddid) {
numcwdfail1++;
free(buf, M_TEMP);
return (ENOTDIR);
}
If "dir3" is for example NFS mount-point there are no problems.
Any ideas?
-----[ end mail ]-----
--
Pawel Jakub Dawidek
UNIX Systems Administrator
http://garage.freebsd.pl
Am I Evil? Yes, I Am.
msg38043/pgp00000.pgp
Description: PGP signature

