Date: Tue, 19 Nov 2013 22:53:34 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: Doug Ambrisko <ambrisko@ambrisko.com> Cc: Konstantin Belousov <kostikbel@gmail.com>, freebsd-hackers@freebsd.org, Dirk Engling <erdgeist@erdgeist.org>, Jase Thew <jase@freebsd.org>, mdf@freebsd.org Subject: Re: Re: Fix MNAMELEN or reimplement struct statfs Message-ID: <20131119215334.GA30794@stack.nl> In-Reply-To: <20131118190142.GA28210@ambrisko.com> References: <51B3B59B.8050903@erdgeist.org> <CAMBSHm8GMWffuuEcSpuNu26Mv4N2yAa2iEdw5koiXx0w30zPRQ@mail.gmail.com> <201306101152.17966.jhb@freebsd.org> <52854161.6080104@FreeBSD.org> <20131115010854.GA76106@ambrisko.com> <20131116183129.GD59496@kib.kiev.ua> <20131118190142.GA28210@ambrisko.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 18, 2013 at 11:01:42AM -0800, Doug Ambrisko wrote: > On Sat, Nov 16, 2013 at 08:31:29PM +0200, Konstantin Belousov wrote: > | I think that struct mount should have a const char * field where the > | non-trimmed path is stored and used for match at unmount. f_mntonname > | truncation would be only unfortunate user interface glitch. > Note that we are not storing the path in mount structure so no structures > have changed which is nice since then we haven't introduced any real > ABI breakage. So we could MFC this. The match isn't critical since > umount will fall back to fsid and work. One thing that might be good to > do is change umount to try to umount via fsid first and then do the > match if the fsid failed versus the other way round that it does now. > The problem I see is if someone tries to do things based on the parsed > output of mount/df then that will fail since the output is truncated. As noted in comments in sbin/umount/umount.c, the statfs() call is deliberately after the mount list checks because it may block forever for unresponsive NFS servers. It would be unfortunate if hung NFS filesystems would have to be forcibly unmounted by copy/pasting the fsid from 'mount -v'. I like the idea of allowing longer mount paths in a simple way, though. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131119215334.GA30794>