Commit 7663e96
nfsd: track original timestamps in nfs4_delegation
As Trond points out [1], the "original time" mentioned in RFC 9754
refers to the timestamps on the files at the time that the delegation
was granted, and not the current timestamp of the file on the server.
Store the current timestamps for the file in the nfs4_delegation when
granting one. Add STATX_ATIME and STATX_MTIME to the request mask in
nfs4_delegation_stat(). When granting OPEN_DELEGATE_READ_ATTRS_DELEG, do
a nfs4_delegation_stat() and save the correct atime. If the stat() fails
for any reason, fall back to granting a normal read deleg.
[1]: https://lore.kernel.org/linux-nfs/47a4e40310e797f21b5137e847b06bb203d99e66.camel@kernel.org/
Fixes: 7e13f4f ("nfsd: handle delegated timestamps in SETATTR")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>1 parent c066ff5 commit 7663e96
2 files changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6157 | 6157 | | |
6158 | 6158 | | |
6159 | 6159 | | |
6160 | | - | |
| 6160 | + | |
| 6161 | + | |
6161 | 6162 | | |
6162 | 6163 | | |
6163 | 6164 | | |
| |||
6274 | 6275 | | |
6275 | 6276 | | |
6276 | 6277 | | |
| 6278 | + | |
| 6279 | + | |
| 6280 | + | |
6277 | 6281 | | |
6278 | 6282 | | |
6279 | | - | |
6280 | | - | |
| 6283 | + | |
| 6284 | + | |
| 6285 | + | |
6281 | 6286 | | |
6282 | 6287 | | |
6283 | 6288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| |||
0 commit comments