lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [patch 21/26] mount options: partially fix nfs
From
Date
> > All mount options should be shown, which are needed to reconstruct a
> > previous mount.
>
> Ah, OK.
>
> I'm happy to implement logic to display the all missing options. I
> should have updated nfs_show_mount_options() when I wrote the NFS
> mount option parser.
>
> Let me know your preference.

You are more familiar with NFS, so I think it would be better if you
updated nfs_show_mount_options().

Could you also queue my patch (updated) or incorporate it into a
combined fix?

Thanks,
Miklos
----
Subject: mount options: partially fix nfs

From: Miklos Szeredi <mszeredi@suse.cz>

Add posix, bsize=, namelen= options to /proc/mounts for nfs
filesystems.

Document several other options that are still missing.

Changes:

- display namelen= unconditionally
- addr= isn't missing after all

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
---
Index: linux/fs/nfs/super.c
===================================================================
--- linux.orig/fs/nfs/super.c 2008-01-25 15:44:56.000000000 +0100
+++ linux/fs/nfs/super.c 2008-01-25 15:57:32.000000000 +0100
@@ -449,6 +449,7 @@ static void nfs_show_mount_options(struc
} nfs_info[] = {
{ NFS_MOUNT_SOFT, ",soft", ",hard" },
{ NFS_MOUNT_INTR, ",intr", ",nointr" },
+ { NFS_MOUNT_POSIX, ",posix", "" },
{ NFS_MOUNT_NOCTO, ",nocto", "" },
{ NFS_MOUNT_NOAC, ",noac", "" },
{ NFS_MOUNT_NONLM, ",nolock", "" },
@@ -463,6 +464,9 @@ static void nfs_show_mount_options(struc
seq_printf(m, ",vers=%d", clp->rpc_ops->version);
seq_printf(m, ",rsize=%d", nfss->rsize);
seq_printf(m, ",wsize=%d", nfss->wsize);
+ seq_printf(m, ",namelen=%d", nfss->namelen);
+ if (nfss->bsize != 0)
+ seq_printf(m, ",bsize=%d", nfss->bsize);
if (nfss->acregmin != 3*HZ || showdefaults)
seq_printf(m, ",acregmin=%d", nfss->acregmin/HZ);
if (nfss->acregmax != 60*HZ || showdefaults)
@@ -482,6 +486,17 @@ static void nfs_show_mount_options(struc
seq_printf(m, ",timeo=%lu", 10U * nfss->client->cl_timeout->to_initval / HZ);
seq_printf(m, ",retrans=%u", nfss->client->cl_timeout->to_retries);
seq_printf(m, ",sec=%s", nfs_pseudoflavour_to_name(nfss->client->cl_auth->au_flavor));
+
+ /*
+ * Missing options:
+ * port=
+ * mountport=
+ * mountvers=
+ * mountproto=
+ * clientaddr=
+ * mounthost=
+ * mountaddr=
+ */
}

/*

\
 
 \ /
  Last update: 2008-01-28 12:37    [from the cache]
©2003-2011 Jasper Spaans