Lines Matching refs:ws
188 destroy_cache_mp_write_session(struct cache_mp_write_session_ *ws)
194 assert(ws != NULL);
195 while (!TAILQ_EMPTY(&ws->items)) {
196 data_item = TAILQ_FIRST(&ws->items);
197 TAILQ_REMOVE(&ws->items, data_item, entries);
202 free(ws);
222 struct cache_mp_write_session_ *ws;
260 ws = TAILQ_FIRST(&mp_entry->ws_head);
261 TAILQ_REMOVE(&mp_entry->ws_head, ws, entries);
262 destroy_cache_mp_write_session(ws);
960 cache_mp_write(struct cache_mp_write_session_ *ws, char *data,
966 assert(ws != NULL);
967 assert(ws->parent_entry != NULL);
968 assert(ws->parent_entry->params->entry_type == CET_MULTIPART);
970 if ((ws->parent_entry->mp_params.max_elemsize > 0) &&
971 (ws->parent_entry->mp_params.max_elemsize == ws->items_size)) {
985 TAILQ_INSERT_TAIL(&ws->items, new_item, entries);
986 ++ws->items_size;
996 abandon_cache_mp_write_session(struct cache_mp_write_session_ *ws)
1000 assert(ws != NULL);
1001 assert(ws->parent_entry != NULL);
1002 assert(ws->parent_entry->params->entry_type == CET_MULTIPART);
1004 TAILQ_REMOVE(&ws->parent_entry->ws_head, ws, entries);
1005 --ws->parent_entry->ws_size;
1007 destroy_cache_mp_write_session(ws);
1015 close_cache_mp_write_session(struct cache_mp_write_session_ *ws)
1019 assert(ws != NULL);
1020 assert(ws->parent_entry != NULL);
1021 assert(ws->parent_entry->params->entry_type == CET_MULTIPART);
1023 TAILQ_REMOVE(&ws->parent_entry->ws_head, ws, entries);
1024 --ws->parent_entry->ws_size;
1026 if (ws->parent_entry->completed_write_session == NULL) {
1030 ws->parent_entry->get_time_func(
1031 &ws->parent_entry->creation_time);
1032 ws->parent_entry->completed_write_session = ws;
1039 if (ws->parent_entry->pending_write_session != NULL)
1041 ws->parent_entry->pending_write_session);
1043 ws->parent_entry->pending_write_session = ws;