login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
24
Re: [PATCH 25/27] NFS: Configuration and mount option changes to enable local caching on NFS [try #2]
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Trond Myklebust
Subject:
Re: [PATCH 25/27] NFS: Configuration and mount option changes to enable local caching on NFS [try #2]
Date: Thursday, January 24, 2008 - 2:14 pm
On Wed, 2008-01-23 at 17:22 +0000, David Howells wrote:
quoted text
> Changes to the kernel configuration defintions and to the NFS mount options to > allow the local caching support added by the previous patch to be enabled. > > Signed-off-by: David Howells <dhowells@redhat.com> > --- > > fs/Kconfig | 8 ++++++++ > fs/nfs/client.c | 2 ++ > fs/nfs/internal.h | 1 + > fs/nfs/super.c | 14 ++++++++++++++ > 4 files changed, 25 insertions(+), 0 deletions(-) > > > diff --git a/fs/Kconfig b/fs/Kconfig > index e95b11c..39b1981 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -1650,6 +1650,14 @@ config NFS_V4 > > If unsure, say N. > > +config NFS_FSCACHE > + bool "Provide NFS client caching support (EXPERIMENTAL)" > + depends on EXPERIMENTAL > + depends on NFS_FS=m && FSCACHE || NFS_FS=y && FSCACHE=y > + help > + Say Y here if you want NFS data to be cached locally on disc through > + the general filesystem cache manager > + > config NFS_DIRECTIO > bool "Allow direct I/O on NFS files" > depends on NFS_FS > diff --git a/fs/nfs/client.c b/fs/nfs/client.c > index bcdc5d0..92f9b84 100644 > --- a/fs/nfs/client.c > +++ b/fs/nfs/client.c > @@ -572,6 +572,7 @@ static int nfs_init_server(struct nfs_server *server, > > /* Initialise the client representation from the mount data */ > server->flags = data->flags & NFS_MOUNT_FLAGMASK; > + server->options = data->options; > > if (data->rsize) > server->rsize = nfs_block_size(data->rsize, NULL); > @@ -931,6 +932,7 @@ static int nfs4_init_server(struct nfs_server *server, > /* Initialise the client representation from the mount data */ > server->flags = data->flags & NFS_MOUNT_FLAGMASK; > server->caps |= NFS_CAP_ATOMIC_OPEN; > + server->options = data->options; > > if (data->rsize) > server->rsize = nfs_block_size(data->rsize, NULL); > diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h > index f3acf48..ef09e00 100644 > --- a/fs/nfs/internal.h > +++ b/fs/nfs/internal.h > @@ -35,6 +35,7 @@ struct nfs_parsed_mount_data { > int acregmin, acregmax, > acdirmin, acdirmax; > int namlen; > + unsigned int options; > unsigned int bsize; > unsigned int auth_flavor_len; > rpc_authflavor_t auth_flavors[1]; > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 6dd628f..0542550 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -74,6 +74,7 @@ enum { > Opt_acl, Opt_noacl, > Opt_rdirplus, Opt_nordirplus, > Opt_sharecache, Opt_nosharecache, > + Opt_fscache, Opt_nofscache, > > /* Mount options that take integer arguments */ > Opt_port, > @@ -123,6 +124,8 @@ static match_table_t nfs_mount_option_tokens = { > { Opt_nordirplus, "nordirplus" }, > { Opt_sharecache, "sharecache" }, > { Opt_nosharecache, "nosharecache" }, > + { Opt_fscache, "fsc" }, > + { Opt_nofscache, "nofsc" }, > > { Opt_port, "port=%u" }, > { Opt_rsize, "rsize=%u" }, > @@ -459,6 +462,8 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, > seq_printf(m, ",timeo=%lu", 10U * clp->retrans_timeo / HZ); > seq_printf(m, ",retrans=%u", clp->retrans_count); > seq_printf(m, ",sec=%s", nfs_pseudoflavour_to_name(nfss->client->cl_auth->au_flavor)); > + if (nfss->options & NFS_OPTION_FSCACHE) > + seq_printf(m, ",fsc"); > } > > /* > @@ -697,6 +702,15 @@ static int nfs_parse_mount_options(char *raw, > break; > case Opt_nosharecache: > mnt->flags |= NFS_MOUNT_UNSHARED; > + mnt->options &= ~NFS_OPTION_FSCACHE; > + break; > + case Opt_fscache: > + /* sharing is mandatory with fscache */ > + mnt->options |= NFS_OPTION_FSCACHE; > + mnt->flags &= ~NFS_MOUNT_UNSHARED; > + break;
This is confusing. If the mount options are incompatible, then it makes more sense to return an EINVAL instead of silently turning one of them off.
quoted text
> + case Opt_nofscache: > + mnt->options &= ~NFS_OPTION_FSCACHE; > break; > > case Opt_port:
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 00/27] Permit filesystem local caching [try #2]
, David Howells
, (Wed Jan 23, 10:20 am)
[PATCH 01/27] KEYS: Increase the payload size when instant ...
, David Howells
, (Wed Jan 23, 10:20 am)
[PATCH 02/27] KEYS: Check starting keyring as part of sear ...
, David Howells
, (Wed Jan 23, 10:20 am)
[PATCH 03/27] KEYS: Allow the callout data to be passed as ...
, David Howells
, (Wed Jan 23, 10:20 am)
[PATCH 04/27] KEYS: Add keyctl function to get a security ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 05/27] Security: Change current->fs[ug]id to curren ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 06/27] Security: Separate task security context fro ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 07/27] Security: De-embed task security record from ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 08/27] Add a secctx_to_secid() LSM hook to go along ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 09/27] Security: Pre-add additional non-caching cla ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 10/27] Security: Add a kernel_service object class ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 11/27] Security: Allow kernel services to override ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 12/27] Security: Make NFSD work with detached secur ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 13/27] FS-Cache: Release page->private after failed ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 14/27] FS-Cache: Recruit a couple of page flags for ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 15/27] FS-Cache: Provide an add_wait_queue_tail() f ...
, David Howells
, (Wed Jan 23, 10:21 am)
[PATCH 16/27] FS-Cache: Generic filesystem caching facilit ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 17/27] CacheFiles: Add missing copy_page export for ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 18/27] CacheFiles: Be consistent about the use of m ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 19/27] CacheFiles: Add a hook to write a single pag ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 20/27] CacheFiles: Permit the page lock state to be ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 21/27] CacheFiles: Export things for CacheFiles [tr ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 22/27] CacheFiles: A cache that backs onto a mounte ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 23/27] NFS: Fix memory leak [try #2]
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 24/27] NFS: Use local caching [try #2]
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 25/27] NFS: Configuration and mount option changes ...
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 26/27] NFS: Display local caching state [try #2]
, David Howells
, (Wed Jan 23, 10:22 am)
[PATCH 27/27] NFS: Separate caching by superblock, explici ...
, David Howells
, (Wed Jan 23, 10:23 am)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, Trond Myklebust
, (Thu Jan 24, 2:08 pm)
Re: [PATCH 25/27] NFS: Configuration and mount option chan ...
, Trond Myklebust
, (Thu Jan 24, 2:14 pm)
Re: [PATCH 23/27] NFS: Fix memory leak [try #2]
, Trond Myklebust
, (Thu Jan 24, 2:15 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, Chuck Lever
, (Thu Jan 24, 2:22 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, David Howells
, (Tue Jan 29, 8:25 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, Trond Myklebust
, (Tue Jan 29, 11:46 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, Chuck Lever
, (Wed Jan 30, 3:36 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, David Howells
, (Thu Jan 31, 4:29 pm)
Re: [PATCH 24/27] NFS: Use local caching [try #2]
, David Howells
, (Thu Feb 7, 3:57 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso
Re: Cannot change MTU of carp interface?
Richard Daemon
Re: booting openbsd on eee without cd-rom
Colocation donated by:
Syndicate