diff options
author | NeilBrown <neilb@suse.com> | 2016-08-03 14:22:04 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-08-03 14:25:15 -0400 |
commit | 188354e57dd8476e66ce30d647180a106da29b88 (patch) | |
tree | 4fdaac685b79f577254ebc0de13bbf8fa19c4072 /support/include/exportfs.h | |
parent | 2375c47bd7ee1935d5d3ff603f7e346e4ff03088 (diff) | |
download | nfs-utils-188354e57dd8476e66ce30d647180a106da29b88.tar.gz nfs-utils-188354e57dd8476e66ce30d647180a106da29b88.tar.xz nfs-utils-188354e57dd8476e66ce30d647180a106da29b88.zip |
mountd: fail nfsd.export lookup for path to unmounted exportpoint
If an export point should be mounted ("mountpoint" option set) but
isn't, then an attempt to mount using the MOUNT protocol for NFSv3
will fail and an attempt to access the filesystem using a pre-existing
filehandle will block because nfsd_fh wont tell the kernel about it.
However a lookup from the parent, as happens with an NFSv4 mount
request, will pass the name to nfsd_export(), and it doesn't check the
mointpoint option, and so exports the underlying (typically "/")
filesystem.
So change nfsd_export() to refused to export that exportpoint, but
instead to explictly say that it isn't exported.
This will cause an 'ls' in the parent pseudo-root directory to not show
the name and will cause a "mount" attempt which walks down through the
pseudo root to fail in the same way that it does with NFSv3.
An access from a pre-existing NFSv4 mount will still hang until the
filesystem is mounted, just like it does with NFSv3.
In order to be a bit more responsive to the filesystem getting mounted,
just a short timeout (1 minutes) on exports of missing "mountpoint"
exportpoints.
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/include/exportfs.h')
0 files changed, 0 insertions, 0 deletions