All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: David Howells <dhowells@redhat.com>
Cc: steved@redhat.com, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] NFS: Propagate 'fsc' mount option through automounts
Date: Thu, 09 Jul 2009 13:50:51 -0400	[thread overview]
Message-ID: <1247161851.5766.44.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <1552.1247160463@redhat.com>

On Thu, 2009-07-09 at 18:27 +0100, David Howells wrote:
> 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
> 
> now 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.
> 
> Note, however, that it doesn't propagate the uniquifier in the case of
> 'fsc=<xxx>' being passed to mount.  This is probably wrong, and needs looking
> at.

Why not just use the mount path as the default uniquifier?

> Signed-off-by: David Howells <dhowells@redhat.com>
> ---
> 
>  fs/nfs/client.c |    1 +
>  fs/nfs/super.c  |    6 ++++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index c2d0616..0949b46 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -964,6 +964,7 @@ static void nfs_server_copy_userdata(struct nfs_server *target, struct nfs_serve
>  	target->acdirmin = source->acdirmin;
>  	target->acdirmax = source->acdirmax;
>  	target->caps = source->caps;
> +	target->options = source->options;

BTW: Why does fscache require a private flag field?

>  }
>  
>  /*
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 0b4cbdc..bfab16f 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -2214,6 +2214,7 @@ static int nfs_xdev_get_sb(struct file_system_type *fs_type, int flags,
>  	struct nfs_server *server;
>  	struct dentry *mntroot;
>  	int (*compare_super)(struct super_block *, void *) = nfs_compare_super;
> +	struct nfs_parsed_mount_data parsed_data = { .fscache_uniq = NULL, };

Rather than wasting all this space on the stack, how about just changing
the second argument of nfs_fscache_get_super_cookie()? You only use the
pointer to data->fscache_uniq.

>  	struct nfs_sb_mountdata sb_mntdata = {
>  		.mntflags = flags,
>  	};

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  reply	other threads:[~2009-07-09 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09 17:27 [PATCH][RFC] NFS: Propagate 'fsc' mount option through automounts David Howells
2009-07-09 17:50 ` Trond Myklebust [this message]
2009-07-14 17:47 ` David Howells
2009-07-14 19:03   ` Trond Myklebust
2009-07-15 10:50   ` David Howells

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=1247161851.5766.44.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfsv4@linux-nfs.org \
    --cc=steved@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.