Mount point not found in mtab
Andrew John Hughes
gnu_andrew at member.fsf.org
Wed May 27 12:49:25 PDT 2009
2009/5/27 Alan Bateman <Alan.Bateman at sun.com>:
> Mark Wielaard wrote:
>>
>> :
>> Aha, this seems to come from the fact that under the chroot /etc/mtab
>> has not all file systems. In fact there is no guarantee that it has,
>> since one could have mounted with -n so /etc/mtab isn't updated. A
>> workaround might be to use /proc/mounts if /etc/mtab misses the
>> information.
>>
>>
>
> A mysterious failure indeed - thanks for the bug report and sleuthing.
> LinuxFileStore's findMountEntry does assume that all file systems are listed
> in /etc/mtab so we can fix this as you suggest by looking in /proc/mounts
> if needed. I'll try to get time in the next day or two to put a fix into
> nio/nio/jdk for this. If you need a quick workaround then changing
> getMountEntries to open /proc/mounts instead of /etc/mnttab should do it
> with the only side effect that getFileStores() will return an iterator over
> all mounted file systems so it won't match df exactly.
>
> As an aside, I have changes in the pipe to the temp file support that
> eliminates probing of the tmp directory (that code in File$TemporyDirectory
> is a bit ugly and needed to be re factored). It's possible we wouldn't have
> seen this issue if these changes had come earlier.
>
> -Alan
>
>
Quicker than expected:
http://hg.openjdk.java.net/nio/nio/jdk/rev/df307ca8f332
Was just about to post a webrev for it :)
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the nio-dev
mailing list