From: Trond Myklebust Date: Thu, 1 Nov 2012 21:07:07 +0000 (-0400) Subject: NFSv4.1: Remove the 'FIFO' behaviour for nfs41_setup_sequence X-Git-Tag: next-20121102~90^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=30550b447bb924a1b99973fbe3da0ea4436d5703;p=karo-tx-linux.git 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 --- diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index 01e58fd0b65d..c77fe72de74a 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -240,7 +240,6 @@ static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *ser return server->nfs_client->cl_session; } -extern bool nfs4_set_task_privileged(struct rpc_task *task, void *dummy); extern int nfs4_setup_sequence(const struct nfs_server *server, struct nfs4_sequence_args *args, struct nfs4_sequence_res *res, struct rpc_task *task); diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a6c17924f635..45215e3362cd 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -429,20 +429,13 @@ nfs4_free_slot(struct nfs4_slot_table *tbl, u32 slotid) slotid, tbl->highest_used_slotid); } -bool nfs4_set_task_privileged(struct rpc_task *task, void *dummy) -{ - rpc_task_set_priority(task, RPC_PRIORITY_PRIVILEGED); - return true; -} - /* * Signal state manager thread if session fore channel is drained */ static void nfs4_check_drain_fc_complete(struct nfs4_session *ses) { if (!test_bit(NFS4_SESSION_DRAINING, &ses->session_state)) { - rpc_wake_up_first(&ses->fc_slot_table.slot_tbl_waitq, - nfs4_set_task_privileged, NULL); + rpc_wake_up_next(&ses->fc_slot_table.slot_tbl_waitq); return; } @@ -622,12 +615,6 @@ int nfs41_setup_sequence(struct nfs4_session *session, goto out_sleep; } - if (!rpc_queue_empty(&tbl->slot_tbl_waitq) && - !rpc_task_has_priority(task, RPC_PRIORITY_PRIVILEGED)) { - dprintk("%s enforce FIFO order\n", __func__); - goto out_sleep; - } - slotid = nfs4_find_slot(tbl); if (slotid == NFS4_NO_SLOT) { dprintk("<-- %s: no free slots\n", __func__); diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index e0a28dffd29d..6292424d4927 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) spin_lock(&tbl->slot_tbl_lock); max_slots = tbl->max_slots; while (max_slots--) { - if (rpc_wake_up_first(&tbl->slot_tbl_waitq, - nfs4_set_task_privileged, - NULL) == NULL) + if (rpc_wake_up_next(&tbl->slot_tbl_waitq) == NULL) break; } spin_unlock(&tbl->slot_tbl_lock);