diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-11-01 17:07:07 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-05 18:30:50 -0500 |
commit | 275e7e20aa8599719729f8ef4c09c9bfc4895642 (patch) | |
tree | d56472ae8611905d0ba8c5bb51e8a9651615fd57 /fs | |
parent | 7b939a3f44293516c4225f640e8c4b9200beeabc (diff) |
NFSv4.1: Remove the 'FIFO' behaviour for nfs41_setup_sequence
It is more important to preserve the task priority behaviour, which ensures
that things like reclaim writes take precedence over background and kupdate
writes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4_fs.h | 1 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 15 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 4 |
3 files changed, 2 insertions, 18 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 4f0cdc1b7148..4635bf51b3e6 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -236,7 +236,6 @@ static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *ser | |||
236 | return server->nfs_client->cl_session; | 236 | return server->nfs_client->cl_session; |
237 | } | 237 | } |
238 | 238 | ||
239 | extern bool nfs4_set_task_privileged(struct rpc_task *task, void *dummy); | ||
240 | extern int nfs4_setup_sequence(const struct nfs_server *server, | 239 | extern int nfs4_setup_sequence(const struct nfs_server *server, |
241 | struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, | 240 | struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, |
242 | struct rpc_task *task); | 241 | struct rpc_task *task); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 87525eb60bd8..4b1635ce658d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -379,12 +379,6 @@ static void renew_lease(const struct nfs_server *server, unsigned long timestamp | |||
379 | 379 | ||
380 | #if defined(CONFIG_NFS_V4_1) | 380 | #if defined(CONFIG_NFS_V4_1) |
381 | 381 | ||
382 | bool nfs4_set_task_privileged(struct rpc_task *task, void *dummy) | ||
383 | { | ||
384 | rpc_task_set_priority(task, RPC_PRIORITY_PRIVILEGED); | ||
385 | return true; | ||
386 | } | ||
387 | |||
388 | static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res) | 382 | static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res) |
389 | { | 383 | { |
390 | struct nfs4_session *session; | 384 | struct nfs4_session *session; |
@@ -412,8 +406,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res) | |||
412 | if (tbl->highest_used_slotid != NFS4_NO_SLOT) | 406 | if (tbl->highest_used_slotid != NFS4_NO_SLOT) |
413 | send_new_highest_used_slotid = false; | 407 | send_new_highest_used_slotid = false; |
414 | if (!nfs4_session_draining(session)) { | 408 | if (!nfs4_session_draining(session)) { |
415 | if (rpc_wake_up_first(&tbl->slot_tbl_waitq, | 409 | if (rpc_wake_up_next(&tbl->slot_tbl_waitq) != NULL) |
416 | nfs4_set_task_privileged, NULL) != NULL) | ||
417 | send_new_highest_used_slotid = false; | 410 | send_new_highest_used_slotid = false; |
418 | } | 411 | } |
419 | spin_unlock(&tbl->slot_tbl_lock); | 412 | spin_unlock(&tbl->slot_tbl_lock); |
@@ -527,12 +520,6 @@ int nfs41_setup_sequence(struct nfs4_session *session, | |||
527 | goto out_sleep; | 520 | goto out_sleep; |
528 | } | 521 | } |
529 | 522 | ||
530 | if (!rpc_queue_empty(&tbl->slot_tbl_waitq) && | ||
531 | !rpc_task_has_priority(task, RPC_PRIORITY_PRIVILEGED)) { | ||
532 | dprintk("%s enforce FIFO order\n", __func__); | ||
533 | goto out_sleep; | ||
534 | } | ||
535 | |||
536 | slot = nfs4_alloc_slot(tbl); | 523 | slot = nfs4_alloc_slot(tbl); |
537 | if (IS_ERR(slot)) { | 524 | if (IS_ERR(slot)) { |
538 | /* If out of memory, try again in 1/4 second */ | 525 | /* If out of memory, try again in 1/4 second */ |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index c137421f2123..7d73df5a05d1 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -263,9 +263,7 @@ static void nfs4_end_drain_session(struct nfs_client *clp) | |||
263 | if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { | 263 | if (test_and_clear_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { |
264 | spin_lock(&tbl->slot_tbl_lock); | 264 | spin_lock(&tbl->slot_tbl_lock); |
265 | for (i = 0; i <= tbl->max_slotid; i++) { | 265 | for (i = 0; i <= tbl->max_slotid; i++) { |
266 | if (rpc_wake_up_first(&tbl->slot_tbl_waitq, | 266 | if (rpc_wake_up_next(&tbl->slot_tbl_waitq) == NULL) |
267 | nfs4_set_task_privileged, | ||
268 | NULL) == NULL) | ||
269 | break; | 267 | break; |
270 | } | 268 | } |
271 | spin_unlock(&tbl->slot_tbl_lock); | 269 | spin_unlock(&tbl->slot_tbl_lock); |