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
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Matthew Garrett
Re: [PATCH] Enable speedstep for sonoma processors.
Mauro Carvalho Chehab
Re: [PATCH 1/2] media: Add timberdale video-in driver
Peter Zijlstra
[PATCH 23/30] netvm: skb processing
Greg Kroah-Hartman
[PATCH 21/28] cgroupfs: create /sys/fs/cgroup to mount cgroupfs on
git
:
Jan Hudec
Re: GIT push to sftp (feature request)
Steffen Prohaska
[PATCH 0/4] core.ignorecase
Johannes Schindelin
Re: Git checkout preserve timestamp?
Linus Torvalds
[PATCH 1/7] Make unpack_trees_options bit flags actual bitfields
Johan Herland
Re: What's cooking in git.git (Oct 2010, #01; Wed, 13)
linux-netdev
:
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Richard Cochran
Re: [PATCH v3 3/3] ptp: Added a clock that uses the eTSEC found on the MPC85xx.
Jan Engelhardt
Re: [PATCH] Fix netfilter xt_time's time_mt()'s use of do_div()
Herbert Xu
Re: [RFC PATCH 00/17] virtual-bus
Jeff Kirsher
Re: [net-next-2.6 PATCH] e1000e: don't inadvertently re-set INTX_DISABLE
git-commits-head
:
Linux Kernel Mailing List
ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
Linux Kernel Mailing List
Use path_put() in a few places instead of {mnt,d}put()
Linux Kernel Mailing List
mv643xx_eth: use sw csum for big packets
Linux Kernel Mailing List
arm: fix HAVE_CLK merge goof
Linux Kernel Mailing List
arm: convert pcm037 platform to use smsc911x
freebsd-current
:
David Wolfskill
"interrupt storm..."; seems associated with an0 NIC
Andriy Gapon
Re: letting glabel recognise a media change
Garrett Cooper
Re: Only display ACPI bootmenu key if ACPI is present
Pyun YongHyeon
CFT: msk(4) Rx checksum offloading support
FreeBSD Tinderbox
[head tinderbox] failure on sparc64/sparc64
Colocation donated by:
Syndicate