Skip to content
Commit 038efb63 authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Anna Schumaker
Browse files

NFSv4.2: Fixup CLONE dest file size for zero-length count



When holding a delegation, the NFS client optimizes away setting the
attributes of a file from the GETATTR in the compound after CLONE, and for
a zero-length CLONE we will end up setting the inode's size to zero in
nfs42_copy_dest_done().  Handle this case by computing the resulting count
from the server's reported size after CLONE's GETATTR.

Suggested-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Fixes: 94d202d5 ("NFSv42: Copy offload should update the file size when appropriate")
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 8a0fa3ff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment