diff options
author | David Howells <dhowells@redhat.com> | 2009-09-23 14:36:39 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-09-23 14:36:39 -0400 |
commit | 2df54806389205d76bc3d1ce8a10cc14889ddec9 (patch) | |
tree | 7c1c170e39d50dd105792e25522e249ea371758e /fs/nfs/super.c | |
parent | 4111d4fde6aa04a2e42c43d0e74593e6144b0f0f (diff) |
NFS: Propagate 'fsc' mount option through automounts
Propagate the NFS 'fsc' mount option through NFS automounts of various types.
This is now required as commit:
commit c02d7adf8c5429727a98bad1d039bccad4c61c50
Author: Trond Myklebust <Trond.Myklebust@netapp.com>
Date: Mon Jun 22 15:09:14 2009 -0400
NFSv4: Replace nfs4_path_walk() with VFS path lookup in a private namespace
uses VFS-driven automounting to reach all submounts barring the root, thus
preventing fscaching from being enabled on any submount other than the root.
This patch gets around that by propagating the NFS_OPTION_FSCACHE flag across
automounts. If a uniquifier is supplied to a mount then this is propagated to
all automounts of that mount too.
Signed-off-by: David Howells <dhowells@redhat.com>
[Trond: Fixed up the definition of nfs_fscache_get_super_cookie for the
case of #undef CONFIG_NFS_FSCACHE]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 92bbe1de4fcf..810770f96816 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2154,7 +2154,8 @@ static int nfs_get_sb(struct file_system_type *fs_type, | |||
2154 | if (!s->s_root) { | 2154 | if (!s->s_root) { |
2155 | /* initial superblock/root creation */ | 2155 | /* initial superblock/root creation */ |
2156 | nfs_fill_super(s, data); | 2156 | nfs_fill_super(s, data); |
2157 | nfs_fscache_get_super_cookie(s, data); | 2157 | nfs_fscache_get_super_cookie( |
2158 | s, data ? data->fscache_uniq : NULL, NULL); | ||
2158 | } | 2159 | } |
2159 | 2160 | ||
2160 | mntroot = nfs_get_root(s, mntfh); | 2161 | mntroot = nfs_get_root(s, mntfh); |
@@ -2255,6 +2256,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags, | |||
2255 | if (!s->s_root) { | 2256 | if (!s->s_root) { |
2256 | /* initial superblock/root creation */ | 2257 | /* initial superblock/root creation */ |
2257 | nfs_clone_super(s, data->sb); | 2258 | nfs_clone_super(s, data->sb); |
2259 | nfs_fscache_get_super_cookie(s, NULL, data); | ||
2258 | } | 2260 | } |
2259 | 2261 | ||
2260 | mntroot = nfs_get_root(s, data->fh); | 2262 | mntroot = nfs_get_root(s, data->fh); |
@@ -2507,7 +2509,8 @@ static int nfs4_remote_get_sb(struct file_system_type *fs_type, | |||
2507 | if (!s->s_root) { | 2509 | if (!s->s_root) { |
2508 | /* initial superblock/root creation */ | 2510 | /* initial superblock/root creation */ |
2509 | nfs4_fill_super(s); | 2511 | nfs4_fill_super(s); |
2510 | nfs_fscache_get_super_cookie(s, data); | 2512 | nfs_fscache_get_super_cookie( |
2513 | s, data ? data->fscache_uniq : NULL, NULL); | ||
2511 | } | 2514 | } |
2512 | 2515 | ||
2513 | mntroot = nfs4_get_root(s, mntfh); | 2516 | mntroot = nfs4_get_root(s, mntfh); |
@@ -2740,6 +2743,7 @@ static int nfs4_xdev_get_sb(struct file_system_type *fs_type, int flags, | |||
2740 | if (!s->s_root) { | 2743 | if (!s->s_root) { |
2741 | /* initial superblock/root creation */ | 2744 | /* initial superblock/root creation */ |
2742 | nfs4_clone_super(s, data->sb); | 2745 | nfs4_clone_super(s, data->sb); |
2746 | nfs_fscache_get_super_cookie(s, NULL, data); | ||
2743 | } | 2747 | } |
2744 | 2748 | ||
2745 | mntroot = nfs4_get_root(s, data->fh); | 2749 | mntroot = nfs4_get_root(s, data->fh); |
@@ -2821,6 +2825,7 @@ static int nfs4_remote_referral_get_sb(struct file_system_type *fs_type, | |||
2821 | if (!s->s_root) { | 2825 | if (!s->s_root) { |
2822 | /* initial superblock/root creation */ | 2826 | /* initial superblock/root creation */ |
2823 | nfs4_fill_super(s); | 2827 | nfs4_fill_super(s); |
2828 | nfs_fscache_get_super_cookie(s, NULL, data); | ||
2824 | } | 2829 | } |
2825 | 2830 | ||
2826 | mntroot = nfs4_get_root(s, &mntfh); | 2831 | mntroot = nfs4_get_root(s, &mntfh); |