summaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-04-25 14:26:50 +0100
committerDavid Howells <dhowells@redhat.com>2019-04-25 14:26:50 +0100
commita690f60a2ba3125a2f08cdde176376f5ec1d8a84 (patch)
treeba05bc0309f660d66acf188c6e25a1689109f2c0 /fs/afs/internal.h
parent0b9bf3812ad1f0d937584e300826285694f53e2b (diff)
downloadlinux-stable-a690f60a2ba3125a2f08cdde176376f5ec1d8a84.tar.gz
linux-stable-a690f60a2ba3125a2f08cdde176376f5ec1d8a84.tar.bz2
linux-stable-a690f60a2ba3125a2f08cdde176376f5ec1d8a84.zip
afs: Calculate lock extend timer from set/extend reply reception
Record the timestamp on the first reply DATA packet received in response to a set- or extend-lock operation, then use this to calculate the time remaining till the lock expires rather than using whatever time the requesting process wakes up and finishes processing the operation as a base. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 61e24551574d..6e680783f59f 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -638,6 +638,7 @@ struct afs_vnode {
struct list_head granted_locks; /* locks granted on this file */
struct delayed_work lock_work; /* work to be done in locking */
struct key *lock_key; /* Key to be used in lock ops */
+ ktime_t locked_at; /* Time at which lock obtained */
enum afs_lock_state lock_state : 8;
afs_lock_type_t lock_type : 8;
@@ -905,6 +906,7 @@ extern void afs_put_read(struct afs_read *);
*/
extern struct workqueue_struct *afs_lock_manager;
+extern void afs_lock_op_done(struct afs_call *);
extern void afs_lock_work(struct work_struct *);
extern void afs_lock_may_be_available(struct afs_vnode *);
extern int afs_lock(struct file *, int, struct file_lock *);