]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFSv4.1: Remove the 'FIFO' behaviour for nfs41_setup_sequence
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Nov 2012 21:07:07 +0000 (17:07 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sun, 4 Nov 2012 19:43:44 +0000 (14:43 -0500)
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>
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c

index 01e58fd0b65d051a6e276a99486aa76d2f1afa4c..c77fe72de74a8eb333525bae7630a074cfd28c35 100644 (file)
@@ -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);
index 517e77dfb7e4b90cd26e5b87308a80471beb4c40..a75df391e1bb8e30cf6f1a29da31bb4656143591 100644 (file)
@@ -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__);
index e0a28dffd29dc20ee472fa634a4165208873c8aa..6292424d49270e3c7f18bb998e6a5a73d35aa5c9 100644 (file)
@@ -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);