Lines Matching refs:item

995 #define WORKLIST_INSERT(head, item) do {	\
996 (item)->wk_state |= ONWORKLIST; \
997 LIST_INSERT_HEAD(head, item, wk_list); \
999 #define WORKLIST_REMOVE(item) do { \
1000 (item)->wk_state &= ~ONWORKLIST; \
1001 LIST_REMOVE(item, wk_list); \
1010 #define WORKLIST_INSERT(head, item) worklist_insert(head, item, 1)
1011 #define WORKLIST_INSERT_UNLOCKED(head, item) worklist_insert(head, item, 0)
1012 #define WORKLIST_REMOVE(item) worklist_remove(item, 1)
1013 #define WORKLIST_REMOVE_UNLOCKED(item) worklist_remove(item, 0)
1016 worklist_insert(head, item, locked)
1018 struct worklist *item;
1023 LOCK_OWNED(VFSTOUFS(item->wk_mp));
1024 if (item->wk_state & ONWORKLIST)
1026 item, TYPENAME(item->wk_type), item->wk_state);
1027 item->wk_state |= ONWORKLIST;
1028 LIST_INSERT_HEAD(head, item, wk_list);
1032 worklist_remove(item, locked)
1033 struct worklist *item;
1038 LOCK_OWNED(VFSTOUFS(item->wk_mp));
1039 if ((item->wk_state & ONWORKLIST) == 0)
1041 item, TYPENAME(item->wk_type), item->wk_state);
1042 item->wk_state &= ~ONWORKLIST;
1043 LIST_REMOVE(item, wk_list);
1154 #define WORKITEM_FREE(item, type) \
1155 workitem_free((struct worklist *)(item), (type))
1156 #define WORKITEM_REASSIGN(item, type) \
1157 workitem_reassign((struct worklist *)(item), (type))
1160 workitem_free(item, type)
1161 struct worklist *item;
1167 if (item->wk_state & ONWORKLIST)
1169 TYPENAME(item->wk_type), item->wk_state);
1170 if (item->wk_type != type && type != D_NEWBLK)
1172 TYPENAME(item->wk_type), TYPENAME(type));
1174 if (item->wk_state & IOWAITING)
1175 wakeup(item);
1176 ump = VFSTOUFS(item->wk_mp);
1183 KASSERT(dep_current[item->wk_type] > 0,
1185 ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type)));
1186 KASSERT(ump->softdep_curdeps[item->wk_type] > 0,
1188 ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type)));
1189 atomic_subtract_long(&dep_current[item->wk_type], 1);
1190 ump->softdep_curdeps[item->wk_type] -= 1;
1191 free(item, DtoM(type));
1195 workitem_alloc(item, type, mp)
1196 struct worklist *item;
1202 item->wk_type = type;
1203 item->wk_mp = mp;
1204 item->wk_state = 0;
1221 workitem_reassign(item, newtype)
1222 struct worklist *item;
1227 ump = VFSTOUFS(item->wk_mp);
1229 KASSERT(ump->softdep_curdeps[item->wk_type] > 0,
1231 VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type)));
1232 ump->softdep_curdeps[item->wk_type] -= 1;
1234 KASSERT(dep_current[item->wk_type] > 0,
1236 VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type)));
1239 dep_current[item->wk_type]--;
1244 item->wk_type = newtype;
1488 * Add an item to the end of the work queue.
1526 * Remove the item to be processed. If we are removing the last
1527 * item on the list, we need to recalculate the tail pointer.
1704 /* Another thread is executing this item. */
1747 * Process one item on the worklist.
1828 * We have to retry the worklist item later. Wake up any
1830 * add the item back to the head so we don't try to execute
2863 * Remove an arbitrary item for the journal worklist maintain the tail
3375 * journal item yet.
4581 * Wait for a journal item to make it to disk. Initiate journal processing
4618 * worklist item as IOWAITING because we drop the lock while
7483 /* Should only ever be one item in the list. */
13360 softdep_excess_items(struct ufsmount *ump, int item)
13363 KASSERT(item >= 0 && item < D_LAST, ("item %d", item));
13364 return (dep_current[item] > max_softdeps &&
13365 ump->softdep_curdeps[item] > max_softdeps /