]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the NFS server so that it sets va_birthtime.
authorRick Macklem <rmacklem@FreeBSD.org>
Sun, 26 Jul 2020 23:03:41 +0000 (23:03 +0000)
committerRick Macklem <rmacklem@FreeBSD.org>
Sun, 26 Jul 2020 23:03:41 +0000 (23:03 +0000)
commit2de592f6e14d3a4c1803146fd4c2252a1827a957
tree4bbdd86a661a5aef66624d255250c4a0177e2f5a
parenta450ecfdbd954f5b10a3b6eb74b1cd863b2b5c1c
Fix the NFS server so that it sets va_birthtime.

r362490 marked that the NFSv4 attribute TimeCreate (va_birthtime) is supported,
but it did not change the NFS server code to actually do it.
As such, errors could occur when unrolling a tarball onto an NFSv4 mounted
volume, since setting TimeCreate would fail with a NFSERR_ATTRNOTSUPP reply.

This patch fixes the server so that it does TimeCreate and also makes
sure that TimeCreate will not be set for a DS file for a pNFS server.

A separate commit will add a check to the NFSv4 client for support of
the TimeCreate attribute before attempting to set it, to avoid a problem
when mounting a server that does not support the attribute.
The failures will still occur for r362490 or later kernels that do not
have this patch, since they indicate support for the attribute, but do not
actually support the attribute.
sys/fs/nfsserver/nfs_nfsdport.c