Lines Matching full:slot
37 * nfs4_shrink_slot_table - free retired slots from the slot table
49 struct nfs4_slot *slot = *p; in nfs4_shrink_slot_table() local
51 *p = slot->next; in nfs4_shrink_slot_table()
52 kfree(slot); in nfs4_shrink_slot_table()
59 * @tbl: controlling slot table
69 * nfs4_free_slot - free a slot and efficiently update slot table.
71 * freeing a slot is trivially done by clearing its respective bit
74 * so that the server would be able to size down the slot table if needed,
83 void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot) in nfs4_free_slot() argument
85 u32 slotid = slot->slot_nr; in nfs4_free_slot()
107 struct nfs4_slot *slot; in nfs4_new_slot() local
109 slot = kzalloc(sizeof(*slot), gfp_mask); in nfs4_new_slot()
110 if (slot) { in nfs4_new_slot()
111 slot->table = tbl; in nfs4_new_slot()
112 slot->slot_nr = slotid; in nfs4_new_slot()
113 slot->seq_nr = seq_init; in nfs4_new_slot()
114 slot->seq_nr_highest_sent = seq_init; in nfs4_new_slot()
115 slot->seq_nr_last_acked = seq_init - 1; in nfs4_new_slot()
117 return slot; in nfs4_new_slot()
123 struct nfs4_slot **p, *slot; in nfs4_find_or_create_slot() local
134 slot = *p; in nfs4_find_or_create_slot()
135 if (slot->slot_nr == slotid) in nfs4_find_or_create_slot()
136 return slot; in nfs4_find_or_create_slot()
137 p = &slot->next; in nfs4_find_or_create_slot()
143 struct nfs4_slot *slot) in nfs4_lock_slot() argument
145 u32 slotid = slot->slot_nr; in nfs4_lock_slot()
151 slot->generation = tbl->generation; in nfs4_lock_slot()
155 * nfs4_try_to_lock_slot - Given a slot try to allocate it
159 bool nfs4_try_to_lock_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot) in nfs4_try_to_lock_slot() argument
161 if (nfs4_test_locked_slot(tbl, slot->slot_nr)) in nfs4_try_to_lock_slot()
163 nfs4_lock_slot(tbl, slot); in nfs4_try_to_lock_slot()
168 * nfs4_lookup_slot - Find a slot but don't allocate it
183 struct nfs4_slot *slot; in nfs4_slot_get_seqid() local
186 slot = nfs4_lookup_slot(tbl, slotid); in nfs4_slot_get_seqid()
187 ret = PTR_ERR_OR_ZERO(slot); in nfs4_slot_get_seqid()
189 *seq_nr = slot->seq_nr; in nfs4_slot_get_seqid()
195 * nfs4_slot_seqid_in_use - test if a slot sequence id is still in use
197 * Given a slot table, slot id and sequence number, determine if the
216 * nfs4_slot_wait_on_seqid - wait until a slot sequence id is complete
218 * Given a slot table, slot id and sequence number, wait until the
234 * nfs4_alloc_slot - efficiently look for a free slot
237 * If found, we mark the slot as used, update the highest_used_slotid,
295 * (re)Initialise a slot table
324 * nfs4_release_slot_table - release all slot table entries
332 * nfs4_shutdown_slot_table - release resources attached to a slot table
333 * @tbl: slot table to shut down
343 * nfs4_setup_slot_table - prepare a stand-alone slot table for use
344 * @tbl: slot table to set up
361 struct nfs4_slot *slot = pslot; in nfs41_assign_slot() local
362 struct nfs4_slot_table *tbl = slot->table; in nfs41_assign_slot()
366 slot->generation = tbl->generation; in nfs41_assign_slot()
367 args->sa_slot = slot; in nfs41_assign_slot()
369 res->sr_slot = slot; in nfs41_assign_slot()
376 struct nfs4_slot *slot) in __nfs41_wake_and_assign_slot() argument
378 if (rpc_wake_up_first(&tbl->slot_tbl_waitq, nfs41_assign_slot, slot)) in __nfs41_wake_and_assign_slot()
384 struct nfs4_slot *slot) in nfs41_wake_and_assign_slot() argument
386 if (slot->slot_nr > tbl->max_slotid) in nfs41_wake_and_assign_slot()
388 return __nfs41_wake_and_assign_slot(tbl, slot); in nfs41_wake_and_assign_slot()
393 struct nfs4_slot *slot = nfs4_alloc_slot(tbl); in nfs41_try_wake_next_slot_table_entry() local
394 if (!IS_ERR(slot)) { in nfs41_try_wake_next_slot_table_entry()
395 bool ret = __nfs41_wake_and_assign_slot(tbl, slot); in nfs41_try_wake_next_slot_table_entry()
398 nfs4_free_slot(tbl, slot); in nfs41_try_wake_next_slot_table_entry()
511 struct nfs4_slot *slot, in nfs41_update_target_slotid() argument
521 if (tbl->generation == slot->generation) in nfs41_update_target_slotid()
554 * both slot tables or neither */ in nfs4_setup_session_slot_tables()
567 nfs4_init_slot_table(&session->fc_slot_table, "ForeChannel Slot table"); in nfs4_alloc_session()
568 nfs4_init_slot_table(&session->bc_slot_table, "BackChannel Slot table"); in nfs4_alloc_session()