public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Treinish <treinish@linux.vnet.ibm.com>
To: linux-nfs@vger.kernel.org
Cc: treinish@linux.vnet.ibm.com
Subject: [PATCH/RFC 1/7] New mount option for volatile filehandle recovery
Date: Fri, 11 Nov 2011 18:04:26 -0500	[thread overview]
Message-ID: <1321052673-22171-2-git-send-email-treinish@linux.vnet.ibm.com> (raw)
In-Reply-To: <1321052673-22171-1-git-send-email-treinish@linux.vnet.ibm.com>

The new 'vfhretry' mount option will be used to enable the volatile filehandle
recovery routines in the client. On an expired filehandle recover the client
will attempt to recover by performing a lookup on the name of the file.

This mechanism of recovery isn't necessarily safe for a posix filesystem so
using the mount option will allow the user to enable this at their own risk. If the mount option is not turned on, the FHEXPIRED error will be converted to
ESTALE.

Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
---
 fs/nfs/super.c            |    6 ++++++
 include/linux/nfs_mount.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 480b3b6..7eef204 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -87,6 +87,7 @@ enum {
 	Opt_sharecache, Opt_nosharecache,
 	Opt_resvport, Opt_noresvport,
 	Opt_fscache, Opt_nofscache,
+	Opt_vfhretry,
 
 	/* Mount options that take integer arguments */
 	Opt_port,
@@ -149,6 +150,7 @@ static const match_table_t nfs_mount_option_tokens = {
 	{ Opt_noresvport, "noresvport" },
 	{ Opt_fscache, "fsc" },
 	{ Opt_nofscache, "nofsc" },
+	{ Opt_vfhretry, "vfhretry" },
 
 	{ Opt_port, "port=%s" },
 	{ Opt_rsize, "rsize=%s" },
@@ -650,6 +652,7 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
 		{ NFS_MOUNT_NORDIRPLUS, ",nordirplus", "" },
 		{ NFS_MOUNT_UNSHARED, ",nosharecache", "" },
 		{ NFS_MOUNT_NORESVPORT, ",noresvport", "" },
+		{ NFS_MOUNT_VFHRETRY, ",vfhretry", ""},
 		{ 0, NULL, NULL }
 	};
 	const struct proc_nfs_info *nfs_infop;
@@ -1203,6 +1206,9 @@ static int nfs_parse_mount_options(char *raw,
 			kfree(mnt->fscache_uniq);
 			mnt->fscache_uniq = NULL;
 			break;
+		case Opt_vfhretry:
+			mnt->flags |= NFS_MOUNT_VFHRETRY;
+			break;
 
 		/*
 		 * options that take numeric values
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h
index 576bddd..dba0e23 100644
--- a/include/linux/nfs_mount.h
+++ b/include/linux/nfs_mount.h
@@ -73,5 +73,6 @@ struct nfs_mount_data {
 
 #define NFS_MOUNT_LOCAL_FLOCK	0x100000
 #define NFS_MOUNT_LOCAL_FCNTL	0x200000
+#define NFS_MOUNT_VFHRETRY	0x400000
 
 #endif
-- 
1.7.4.4


  reply	other threads:[~2011-11-11 23:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 23:04 [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Matthew Treinish
2011-11-11 23:04 ` Matthew Treinish [this message]
2011-11-12  0:19   ` [PATCH/RFC 1/7] New mount option for volatile filehandle recovery Trond Myklebust
2011-11-12  3:35     ` Malahal Naineni
2011-11-11 23:04 ` [PATCH/RFC 2/7] Added support for FH_EXPIRE_TYPE attribute Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 3/7] Add VFS objects from nfs4_proc calls into nfs4_exception Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 4/7] Save root file handle in nfs_server Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 5/7] Added VFH FHEXPIRED recovery functions Matthew Treinish
2011-11-12  0:27   ` Trond Myklebust
2011-11-12  3:45     ` Malahal Naineni
2011-11-12 17:16       ` Trond Myklebust
2011-11-14 21:12         ` Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 6/7] Perform recovery on both inodes for rename Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC 7/7] Added error handling for NFS4ERR_FHEXPIRED Matthew Treinish
2011-11-11 23:04 ` [PATCH/RFC] Hard code testing on server <ONLY FOR TESTING> Matthew Treinish
2011-11-12  0:13 ` [PATCH/RFC 0/7] Volatile Filehandle Client-side Support Trond Myklebust
2011-11-12 14:49   ` Christoph Hellwig
2011-11-13  3:54     ` NeilBrown
2011-11-13 13:45       ` Tigran Mkrtchyan
2011-11-13 16:36         ` J. Bruce Fields
2011-11-13 21:07           ` NeilBrown
2011-11-14  0:42             ` J. Bruce Fields
2011-11-14  1:26               ` NeilBrown
2011-11-14 17:27             ` Trond Myklebust
2011-11-15  6:33             ` Trond Myklebust
2012-01-13 17:09               ` Malahal Naineni
2012-01-14  1:38                 ` J. Bruce Fields
2012-01-16 16:52                   ` Malahal Naineni
2012-01-17 15:18                     ` J. Bruce Fields
2012-01-17 17:22                       ` Malahal Naineni
2012-01-17 18:47                         ` J. Bruce Fields
2012-01-17 19:43                           ` Malahal Naineni
2011-11-14 16:29         ` Trond Myklebust
2011-11-13 16:42       ` J. Bruce Fields
2011-11-13 16:45         ` J. Bruce Fields
2011-11-13 18:25           ` Matthew Treinish
2011-11-13 18:06       ` Matthew Treinish
2011-11-14  9:09         ` Tigran Mkrtchyan
2011-11-14 21:47           ` Matthew Treinish
2011-11-15  6:49         ` Trond Myklebust
2011-11-15 22:38           ` Matthew Treinish

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=1321052673-22171-2-git-send-email-treinish@linux.vnet.ibm.com \
    --to=treinish@linux.vnet.ibm.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