Subject: misc/30962: `du: fts_read: No such file or directory' with fdesc mounted
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <j+nbsd@2005.salmi.ch>
List: netbsd-bugs
Date: 08/10/2005 13:44:00
>Number: 30962
>Category: misc
>Synopsis: `du: fts_read: No such file or directory' with fdesc mounted
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Aug 10 13:44:00 +0000 2005
>Originator: Jukka Salmi
>Release: NetBSD 2.0_STABLE
>Environment:
System: NetBSD grouper.salmi.ch 2.0_STABLE NetBSD 2.0_STABLE (GROUPER) #0: Mon Aug 8 21:35:52 UTC 2005 root@moray.salmi.ch:/build/nbsd/i386/sys/arch/i386/compile/GROUPER i386
Architecture: i386
Machine: i386
>Description:
When using the file-descriptor file system, du(1) under some
circumstances fails, printing `du: fts_read: No such file or directory'.
>How-To-Repeat:
If not already mounted, mount fdesc on /dev:
$ mount -t fdesc -r -o union fdesc /dev
Change to a directory other than `/' and `/dev', e.g.
$ cd /root
Run du(1) to print a summary for the whole file system hierarchy:
$ du -s /
du: fts_read: No such file or directory
>Fix:
Don't know. `errno' is set to ENOENT in fts_safe_changedir() (which
is called from fts_read()) because of different inode and device
numbers.
Calling fts_open() with FTS_NOCHDIR in du.c seems to work around the
problem. However, I doubt that to be a good sulution...