diff mbox series

[4/4] nfs: support i_version in the NFSv4 case

Message ID 1605583086-19869-4-git-send-email-bfields@redhat.com (mailing list archive)
State New, archived
Headers show
Series [1/4] nfsd: move fill_{pre,post}_wcc to nfsfh.c | expand

Commit Message

Bruce Fields Nov. 17, 2020, 3:18 a.m. UTC
From: "J. Bruce Fields" <bfields@redhat.com>

Currently when knfsd re-exports an NFS filesystem, it uses the ctime as
the change attribute.  But obviously we have a real change
attribute--the one that was returned from the original server.  We
should just use that.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 fs/nfs/super.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff Layton Nov. 17, 2020, 12:34 p.m. UTC | #1
On Mon, 2020-11-16 at 22:18 -0500, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
> 
> Currently when knfsd re-exports an NFS filesystem, it uses the ctime as
> the change attribute.  But obviously we have a real change
> attribute--the one that was returned from the original server.  We
> should just use that.
> 
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> ---
>  fs/nfs/super.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 4034102010f0..ca85f81d1b9e 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -1045,6 +1045,7 @@ static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
>  	} else {
>  		sb->s_time_min = S64_MIN;
>  		sb->s_time_max = S64_MAX;
> +		sb->s_flags |= SB_I_VERSION;
>  	}
>  
> 
>  	sb->s_magic = NFS_SUPER_MAGIC;

I don't think we want this change. This will make file_update_time
attempt to bump the i_version field itself using the routines in
iversion.h. This will almost certainly do the wrong thing.
diff mbox series

Patch

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 4034102010f0..ca85f81d1b9e 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1045,6 +1045,7 @@  static void nfs_fill_super(struct super_block *sb, struct nfs_fs_context *ctx)
 	} else {
 		sb->s_time_min = S64_MIN;
 		sb->s_time_max = S64_MAX;
+		sb->s_flags |= SB_I_VERSION;
 	}
 
 	sb->s_magic = NFS_SUPER_MAGIC;