aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2024-12-09 16:14:00 -0500
committerChuck Lever <chuck.lever@oracle.com>2025-01-21 15:30:01 -0500
commit6ae30d6eb26bce02c48c60074b4306270e2434c1 (patch)
treea73c83ce22de15b135f9104617fa860e0497cf21 /include
parentnfsd: rework NFS4_SHARE_WANT_* flag handling (diff)
downloadwireguard-linux-6ae30d6eb26bce02c48c60074b4306270e2434c1.tar.xz
wireguard-linux-6ae30d6eb26bce02c48c60074b4306270e2434c1.zip
nfsd: add support for delegated timestamps
Add support for the delegated timestamps on write delegations. This allows the server to proxy timestamps from the delegation holder to other clients that are doing GETATTRs vs. the same inode. When OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS bit is set in the OPEN call, set the dl_type to the *_ATTRS_DELEG flavor of delegation. Add timespec64 fields to nfs4_cb_fattr and decode the timestamps into those. Vet those timestamps according to the delstid spec and update the inode attrs if necessary. Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/time64.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/time64.h b/include/linux/time64.h
index f1bcea8c124a..9934331c7b86 100644
--- a/include/linux/time64.h
+++ b/include/linux/time64.h
@@ -49,6 +49,11 @@ static inline int timespec64_equal(const struct timespec64 *a,
return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
}
+static inline bool timespec64_is_epoch(const struct timespec64 *ts)
+{
+ return ts->tv_sec == 0 && ts->tv_nsec == 0;
+}
+
/*
* lhs < rhs: return <0
* lhs == rhs: return 0