From: Trond Myklebust <trond.myklebust@primarydata.com>
To: Layton Jeff <jlayton@redhat.com>
Cc: "Yin.JianHong" <jiyin@redhat.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC] nfs: remove nfs_show_devname
Date: Thu, 9 Jan 2014 14:27:04 -0500 [thread overview]
Message-ID: <7AA69B49-5971-4548-BE27-B8F90D1C0F10@primarydata.com> (raw)
In-Reply-To: <20140109141259.553c58f0@tlielax.poochiereds.net>
On Jan 9, 2014, at 14:12, Jeff Layton <jlayton@redhat.com> wrote:
> On Thu, 9 Jan 2014 14:06:54 -0500
> Trond Myklebust <trond.myklebust@primarydata.com> wrote:
>
>>
>> On Jan 9, 2014, at 13:59, Jeff Layton <jlayton@redhat.com> wrote:
>>
>>> The nfs code will currently construct a devname to show in places like
>>> /proc/mounts by turning a dentry into a path. Unfortunately, that's
>>> somewhat problematic if the user ended up mounting through a symlink on
>>> the server. The devname that then shows up in /proc/mounts now doesn't
>>> match the one that was originally passed into the mount request.
>>
>> This is 100% according to design. Why is it suddenly a problem?
>>
>> By displaying the original pathname, you also end up bypassing referral resolution, etc. This is exactly why the .show_devname operation was introduced in the first place.
>>
>
> AFAIU, the main issue is that when /etc/mtab is a symlink
> to /proc/mounts, you can't do this in the example in the patch
> description:
>
> # mount server:/export/bar /mnt/bar
> # umount server:/export/bar
>
> ...since umount will try to ID the mountpoint by looking up the devname
> in /etc/mtab.
The NFS pathname is NOT a devname. It shouldn’t be abused as a substitute for a mount point.
Particularly not so when you consider that the same NFS path can be mounted in several different places with different mount options. The same path can even refer to completely different locations (i.e. different file handles) if, say, the original directory has been renamed on the server.
> What exactly would this break with referrals?
>
It would “break” in the sense that the admin would have no clue that his client is actually talking to a different server than the one specified in the mount.
--
Trond Myklebust
Linux NFS client maintainer
next prev parent reply other threads:[~2014-01-09 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 18:59 [PATCH RFC] nfs: remove nfs_show_devname Jeff Layton
2014-01-09 19:06 ` Trond Myklebust
2014-01-09 19:12 ` Jeff Layton
2014-01-09 19:27 ` Trond Myklebust [this message]
2014-01-09 19:55 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7AA69B49-5971-4548-BE27-B8F90D1C0F10@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=jiyin@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox