Lines Matching refs:cell

74 				struct dm_bio_prison_cell_v2 *cell)
76 mempool_free(cell, &prison->cell_pool);
81 struct dm_bio_prison_cell_v2 *cell)
83 memset(cell, 0, sizeof(*cell));
84 memcpy(&cell->key, key, sizeof(cell->key));
85 bio_list_init(&cell->bios);
124 struct dm_bio_prison_cell_v2 *cell =
127 r = cmp_keys(key, &cell->key);
137 *result = cell;
155 struct dm_bio_prison_cell_v2 **cell)
157 if (__find_or_insert(prison, key, cell_prealloc, cell)) {
158 if ((*cell)->exclusive_lock) {
159 if (lock_level <= (*cell)->exclusive_level) {
160 bio_list_add(&(*cell)->bios, inmate);
165 (*cell)->shared_count++;
168 (*cell)->shared_count = 1;
191 struct dm_bio_prison_cell_v2 *cell)
193 BUG_ON(!cell->shared_count);
194 cell->shared_count--;
197 if (!cell->shared_count) {
198 if (cell->exclusive_lock) {
199 if (cell->quiesce_continuation) {
200 queue_work(prison->wq, cell->quiesce_continuation);
201 cell->quiesce_continuation = NULL;
204 rb_erase(&cell->node, &prison->cells);
213 struct dm_bio_prison_cell_v2 *cell)
219 r = __put(prison, cell);
232 struct dm_bio_prison_cell_v2 *cell;
234 if (__find_or_insert(prison, key, cell_prealloc, &cell)) {
235 if (cell->exclusive_lock)
238 cell->exclusive_lock = true;
239 cell->exclusive_level = lock_level;
240 *cell_result = cell;
244 return cell->shared_count > 0;
247 cell = cell_prealloc;
248 cell->shared_count = 0;
249 cell->exclusive_lock = true;
250 cell->exclusive_level = lock_level;
251 *cell_result = cell;
274 struct dm_bio_prison_cell_v2 *cell,
277 if (!cell->shared_count)
280 cell->quiesce_continuation = continuation;
284 struct dm_bio_prison_cell_v2 *cell,
288 __quiesce(prison, cell, continuation);
294 struct dm_bio_prison_cell_v2 *cell,
297 if (!cell->exclusive_lock)
300 cell->exclusive_level = new_lock_level;
301 return cell->shared_count > 0;
305 struct dm_bio_prison_cell_v2 *cell,
311 r = __promote(prison, cell, new_lock_level);
319 struct dm_bio_prison_cell_v2 *cell,
322 BUG_ON(!cell->exclusive_lock);
324 bio_list_merge(bios, &cell->bios);
325 bio_list_init(&cell->bios);
327 if (cell->shared_count) {
328 cell->exclusive_lock = false;
332 rb_erase(&cell->node, &prison->cells);
337 struct dm_bio_prison_cell_v2 *cell,
343 r = __unlock(prison, cell, bios);