Skip to content

Commit 6e7daa3

Browse files
Olga KornievskaiaTrond Myklebust
authored andcommitted
NFSv4.2: fix CLONE/COPY attrs in presence of delegated attributes
xfstest generic/407 is failing in 2 ways. It detects that after doing a clone the client does not update it's mtime and it's ctime. CLONE always sends a GETATTR operation and then calls nfs_post_op_update_inode() based on the returned attributes. Because of the delegated attributes the client ignores updating the mtime. Then also, when delegated attributes are present, for the change_attr the server replies with the same values as what the client cached before and thus the generic/407 would flag that. Instead, make sure we invalidate the blocks attr. By adding updating delegated attributes in nfs42_copy_dest_done() both COPY and CLONE would update mtime appropriately. Fixes: e12912d ("NFSv4: Add support for delegated atime and mtime attributes") Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent 5d3869a commit 6e7daa3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/nfs/nfs42proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ static void nfs42_copy_dest_done(struct file *file, loff_t pos, loff_t len,
401401
NFS_INO_INVALID_MTIME |
402402
NFS_INO_INVALID_BLOCKS);
403403
spin_unlock(&inode->i_lock);
404+
nfs_update_delegated_mtime(inode);
404405
}
405406

406407
static ssize_t _nfs42_proc_copy(struct file *src,

0 commit comments

Comments
 (0)