aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-05-14 06:44:26 -0400
committerDavid Howells <dhowells@redhat.com>2019-05-16 11:25:21 -0400
commit4571577f16c82f8db8133b228cdca5fd61042c77 (patch)
tree70bf2518622a0b4d0c172f7ebbd05a193805224d /fs/afs
parent87182759cd6f94875d6aaaac74eaa52aa6aa6f98 (diff)
afs: Always get the reply time
Always ask for the reply time from AF_RXRPC as it's used to calculate the callback expiry time and lock expiry times, so it's needed by most FS operations. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/fsclient.c9
-rw-r--r--fs/afs/internal.h2
-rw-r--r--fs/afs/rxrpc.c4
-rw-r--r--fs/afs/vlclient.c1
-rw-r--r--fs/afs/yfsclient.c3
5 files changed, 3 insertions, 16 deletions
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c
index eeba2a359fb4..d4bce3816978 100644
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@ -453,7 +453,6 @@ int afs_fs_fetch_file_status(struct afs_fs_cursor *fc, struct afs_volsync *volsy
453 call->xvnode = vnode; 453 call->xvnode = vnode;
454 call->out_volsync = volsync; 454 call->out_volsync = volsync;
455 call->expected_version = new_inode ? 1 : vnode->status.data_version; 455 call->expected_version = new_inode ? 1 : vnode->status.data_version;
456 call->want_reply_time = true;
457 456
458 /* marshall the parameters */ 457 /* marshall the parameters */
459 bp = call->request; 458 bp = call->request;
@@ -645,7 +644,6 @@ static int afs_fs_fetch_data64(struct afs_fs_cursor *fc, struct afs_read *req)
645 call->out_volsync = NULL; 644 call->out_volsync = NULL;
646 call->read_request = req; 645 call->read_request = req;
647 call->expected_version = vnode->status.data_version; 646 call->expected_version = vnode->status.data_version;
648 call->want_reply_time = true;
649 647
650 /* marshall the parameters */ 648 /* marshall the parameters */
651 bp = call->request; 649 bp = call->request;
@@ -696,7 +694,6 @@ int afs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_read *req)
696 call->out_volsync = NULL; 694 call->out_volsync = NULL;
697 call->read_request = req; 695 call->read_request = req;
698 call->expected_version = vnode->status.data_version; 696 call->expected_version = vnode->status.data_version;
699 call->want_reply_time = true;
700 697
701 /* marshall the parameters */ 698 /* marshall the parameters */
702 bp = call->request; 699 bp = call->request;
@@ -809,7 +806,6 @@ int afs_fs_create(struct afs_fs_cursor *fc,
809 call->out_extra_status = newstatus; 806 call->out_extra_status = newstatus;
810 call->out_cb = newcb; 807 call->out_cb = newcb;
811 call->expected_version = current_data_version + 1; 808 call->expected_version = current_data_version + 1;
812 call->want_reply_time = true;
813 809
814 /* marshall the parameters */ 810 /* marshall the parameters */
815 bp = call->request; 811 bp = call->request;
@@ -1887,7 +1883,6 @@ int afs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type)
1887 1883
1888 call->key = fc->key; 1884 call->key = fc->key;
1889 call->xvnode = vnode; 1885 call->xvnode = vnode;
1890 call->want_reply_time = true;
1891 1886
1892 /* marshall the parameters */ 1887 /* marshall the parameters */
1893 bp = call->request; 1888 bp = call->request;
@@ -1925,7 +1920,6 @@ int afs_fs_extend_lock(struct afs_fs_cursor *fc)
1925 1920
1926 call->key = fc->key; 1921 call->key = fc->key;
1927 call->xvnode = vnode; 1922 call->xvnode = vnode;
1928 call->want_reply_time = true;
1929 1923
1930 /* marshall the parameters */ 1924 /* marshall the parameters */
1931 bp = call->request; 1925 bp = call->request;
@@ -2101,7 +2095,6 @@ struct afs_call *afs_fs_get_capabilities(struct afs_net *net,
2101 call->server = afs_get_server(server); 2095 call->server = afs_get_server(server);
2102 call->server_index = server_index; 2096 call->server_index = server_index;
2103 call->upgrade = true; 2097 call->upgrade = true;
2104 call->want_reply_time = true;
2105 call->async = true; 2098 call->async = true;
2106 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN; 2099 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN;
2107 2100
@@ -2187,7 +2180,6 @@ int afs_fs_fetch_status(struct afs_fs_cursor *fc,
2187 call->out_cb = callback; 2180 call->out_cb = callback;
2188 call->out_volsync = volsync; 2181 call->out_volsync = volsync;
2189 call->expected_version = 1; /* vnode->status.data_version */ 2182 call->expected_version = 1; /* vnode->status.data_version */
2190 call->want_reply_time = true;
2191 2183
2192 /* marshall the parameters */ 2184 /* marshall the parameters */
2193 bp = call->request; 2185 bp = call->request;
@@ -2361,7 +2353,6 @@ int afs_fs_inline_bulk_status(struct afs_fs_cursor *fc,
2361 call->out_scb = statuses; 2353 call->out_scb = statuses;
2362 call->out_volsync = volsync; 2354 call->out_volsync = volsync;
2363 call->count2 = nr_fids; 2355 call->count2 = nr_fids;
2364 call->want_reply_time = true;
2365 2356
2366 /* marshall the parameters */ 2357 /* marshall the parameters */
2367 bp = call->request; 2358 bp = call->request;
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 2a100be91721..9b44307bd934 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -167,7 +167,7 @@ struct afs_call {
167 bool need_attention; /* T if RxRPC poked us */ 167 bool need_attention; /* T if RxRPC poked us */
168 bool async; /* T if asynchronous */ 168 bool async; /* T if asynchronous */
169 bool upgrade; /* T to request service upgrade */ 169 bool upgrade; /* T to request service upgrade */
170 bool want_reply_time; /* T if want reply_time */ 170 bool have_reply_time; /* T if have got reply_time */
171 bool intr; /* T if interruptible */ 171 bool intr; /* T if interruptible */
172 u16 service_id; /* Actual service ID (after upgrade) */ 172 u16 service_id; /* Actual service ID (after upgrade) */
173 unsigned int debug_id; /* Trace ID */ 173 unsigned int debug_id; /* Trace ID */
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index d63e0c9c09e7..4fa5ce92b9b9 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -534,11 +534,11 @@ static void afs_deliver_to_call(struct afs_call *call)
534 return; 534 return;
535 } 535 }
536 536
537 if (call->want_reply_time && 537 if (!call->have_reply_time &&
538 rxrpc_kernel_get_reply_time(call->net->socket, 538 rxrpc_kernel_get_reply_time(call->net->socket,
539 call->rxcall, 539 call->rxcall,
540 &call->reply_time)) 540 &call->reply_time))
541 call->want_reply_time = false; 541 call->have_reply_time = true;
542 542
543 ret = call->type->deliver(call); 543 ret = call->type->deliver(call);
544 state = READ_ONCE(call->state); 544 state = READ_ONCE(call->state);
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c
index 06d010abee96..3d4b9836a2e2 100644
--- a/fs/afs/vlclient.c
+++ b/fs/afs/vlclient.c
@@ -398,7 +398,6 @@ struct afs_call *afs_vl_get_capabilities(struct afs_net *net,
398 call->vlserver = afs_get_vlserver(server); 398 call->vlserver = afs_get_vlserver(server);
399 call->server_index = server_index; 399 call->server_index = server_index;
400 call->upgrade = true; 400 call->upgrade = true;
401 call->want_reply_time = true;
402 call->async = true; 401 call->async = true;
403 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN; 402 call->max_lifespan = AFS_PROBE_MAX_LIFESPAN;
404 403
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index 1f1ccf7b7822..b3ee99972d2f 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -695,7 +695,6 @@ int yfs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_read *req)
695 call->out_volsync = NULL; 695 call->out_volsync = NULL;
696 call->read_request = req; 696 call->read_request = req;
697 call->expected_version = vnode->status.data_version; 697 call->expected_version = vnode->status.data_version;
698 call->want_reply_time = true;
699 698
700 /* marshall the parameters */ 699 /* marshall the parameters */
701 bp = call->request; 700 bp = call->request;
@@ -1847,7 +1846,6 @@ int yfs_fs_set_lock(struct afs_fs_cursor *fc, afs_lock_type_t type)
1847 1846
1848 call->key = fc->key; 1847 call->key = fc->key;
1849 call->xvnode = vnode; 1848 call->xvnode = vnode;
1850 call->want_reply_time = true;
1851 1849
1852 /* marshall the parameters */ 1850 /* marshall the parameters */
1853 bp = call->request; 1851 bp = call->request;
@@ -1886,7 +1884,6 @@ int yfs_fs_extend_lock(struct afs_fs_cursor *fc)
1886 1884
1887 call->key = fc->key; 1885 call->key = fc->key;
1888 call->xvnode = vnode; 1886 call->xvnode = vnode;
1889 call->want_reply_time = true;
1890 1887
1891 /* marshall the parameters */ 1888 /* marshall the parameters */
1892 bp = call->request; 1889 bp = call->request;