linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan Schumaker <bjschuma@netapp.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH v2] NFS: Fix /proc/mount for legacy binary interface
Date: Tue, 03 Aug 2010 13:04:00 -0400	[thread overview]
Message-ID: <4C584C00.80900@netapp.com> (raw)
In-Reply-To: <4C532564.2030302@netapp.com>

Add a flag so we know if we mounted the NFS server using the legacy
binary interface.  If we used the legacy interface, then we should not
show the mountd options.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
---
Fixes a typo in the previous patch
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index f9df16d..9b359a7 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -546,6 +546,9 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
 {
 	struct sockaddr *sap = (struct sockaddr *)&nfss->mountd_address;

+	if (nfss->flags & NFS_MOUNT_LEGACY_INTERFACE)
+		return;
+
 	switch (sap->sa_family) {
 	case AF_INET: {
 		struct sockaddr_in *sin = (struct sockaddr_in *)sap;
@@ -1780,6 +1783,7 @@ static int nfs_validate_mount_data(void *options,
 		 * can deal with.
 		 */
 		args->flags		= data->flags & NFS_MOUNT_FLAGMASK;
+		args->flags		|= NFS_MOUNT_LEGACY_INTERFACE;
 		args->rsize		= data->rsize;
 		args->wsize		= data->wsize;
 		args->timeo		= data->timeo;
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h
index 4499016..5d59ae8 100644
--- a/include/linux/nfs_mount.h
+++ b/include/linux/nfs_mount.h
@@ -69,5 +69,6 @@ struct nfs_mount_data {
 #define NFS_MOUNT_LOOKUP_CACHE_NONEG	0x10000
 #define NFS_MOUNT_LOOKUP_CACHE_NONE	0x20000
 #define NFS_MOUNT_NORESVPORT		0x40000
+#define NFS_MOUNT_LEGACY_INTERFACE	0x80000

 #endif


On 07/30/2010 03:17 PM, Bryan Schumaker wrote:
> Add a flag so we know if we mounted the NFS server using the legacy
> binary interface.  If we used the legacy interface, then we should not
> show the mountd options.
> 
> Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
> ---
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index f9df16d..9b359a7 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -546,6 +546,9 @@ static void nfs_show_mountd_options(struct seq_file *m, struct nfs_server *nfss,
>  {
>  	struct sockaddr *sap = (struct sockaddr *)&nfss->mountd_address;
> 
> +	if (nfss->flags & NFS_MOUNT_LEGACY_INTERFACE)
> +		return
> +
>  	switch (sap->sa_family) {
>  	case AF_INET: {
>  		struct sockaddr_in *sin = (struct sockaddr_in *)sap;
> @@ -1780,6 +1783,7 @@ static int nfs_validate_mount_data(void *options,
>  		 * can deal with.
>  		 */
>  		args->flags		= data->flags & NFS_MOUNT_FLAGMASK;
> +		args->flags		|= NFS_MOUNT_LEGACY_INTERFACE;
>  		args->rsize		= data->rsize;
>  		args->wsize		= data->wsize;
>  		args->timeo		= data->timeo;
> diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h
> index 4499016..5d59ae8 100644
> --- a/include/linux/nfs_mount.h
> +++ b/include/linux/nfs_mount.h
> @@ -69,5 +69,6 @@ struct nfs_mount_data {
>  #define NFS_MOUNT_LOOKUP_CACHE_NONEG	0x10000
>  #define NFS_MOUNT_LOOKUP_CACHE_NONE	0x20000
>  #define NFS_MOUNT_NORESVPORT		0x40000
> +#define NFS_MOUNT_LEGACY_INTERFACE	0x80000
> 
>  #endif


      reply	other threads:[~2010-08-03 17:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-30 19:17 [PATCH] NFS: Fix /proc/mount for legacy binary interface Bryan Schumaker
2010-08-03 17:04 ` Bryan Schumaker [this message]

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=4C584C00.80900@netapp.com \
    --to=bjschuma@netapp.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;
as well as URLs for NNTP newsgroup(s).