• Home
  • Raw
  • Download

Lines Matching full:cell

73 				struct dm_bio_prison_cell_v2 *cell)  in dm_bio_prison_free_cell_v2()  argument
75 mempool_free(cell, &prison->cell_pool); in dm_bio_prison_free_cell_v2()
80 struct dm_bio_prison_cell_v2 *cell) in __setup_new_cell() argument
82 memset(cell, 0, sizeof(*cell)); in __setup_new_cell()
83 memcpy(&cell->key, key, sizeof(cell->key)); in __setup_new_cell()
84 bio_list_init(&cell->bios); in __setup_new_cell()
123 struct dm_bio_prison_cell_v2 *cell = in __find_or_insert() local
126 r = cmp_keys(key, &cell->key); in __find_or_insert()
136 *result = cell; in __find_or_insert()
154 struct dm_bio_prison_cell_v2 **cell) in __get() argument
156 if (__find_or_insert(prison, key, cell_prealloc, cell)) { in __get()
157 if ((*cell)->exclusive_lock) { in __get()
158 if (lock_level <= (*cell)->exclusive_level) { in __get()
159 bio_list_add(&(*cell)->bios, inmate); in __get()
164 (*cell)->shared_count++; in __get()
167 (*cell)->shared_count = 1; in __get()
190 struct dm_bio_prison_cell_v2 *cell) in __put() argument
192 BUG_ON(!cell->shared_count); in __put()
193 cell->shared_count--; in __put()
196 if (!cell->shared_count) { in __put()
197 if (cell->exclusive_lock){ in __put()
198 if (cell->quiesce_continuation) { in __put()
199 queue_work(prison->wq, cell->quiesce_continuation); in __put()
200 cell->quiesce_continuation = NULL; in __put()
203 rb_erase(&cell->node, &prison->cells); in __put()
212 struct dm_bio_prison_cell_v2 *cell) in dm_cell_put_v2() argument
218 r = __put(prison, cell); in dm_cell_put_v2()
231 struct dm_bio_prison_cell_v2 *cell; in __lock() local
233 if (__find_or_insert(prison, key, cell_prealloc, &cell)) { in __lock()
234 if (cell->exclusive_lock) in __lock()
237 cell->exclusive_lock = true; in __lock()
238 cell->exclusive_level = lock_level; in __lock()
239 *cell_result = cell; in __lock()
243 return cell->shared_count > 0; in __lock()
246 cell = cell_prealloc; in __lock()
247 cell->shared_count = 0; in __lock()
248 cell->exclusive_lock = true; in __lock()
249 cell->exclusive_level = lock_level; in __lock()
250 *cell_result = cell; in __lock()
273 struct dm_bio_prison_cell_v2 *cell, in __quiesce() argument
276 if (!cell->shared_count) in __quiesce()
279 cell->quiesce_continuation = continuation; in __quiesce()
283 struct dm_bio_prison_cell_v2 *cell, in dm_cell_quiesce_v2() argument
287 __quiesce(prison, cell, continuation); in dm_cell_quiesce_v2()
293 struct dm_bio_prison_cell_v2 *cell, in __promote() argument
296 if (!cell->exclusive_lock) in __promote()
299 cell->exclusive_level = new_lock_level; in __promote()
300 return cell->shared_count > 0; in __promote()
304 struct dm_bio_prison_cell_v2 *cell, in dm_cell_lock_promote_v2() argument
310 r = __promote(prison, cell, new_lock_level); in dm_cell_lock_promote_v2()
318 struct dm_bio_prison_cell_v2 *cell, in __unlock() argument
321 BUG_ON(!cell->exclusive_lock); in __unlock()
323 bio_list_merge(bios, &cell->bios); in __unlock()
324 bio_list_init(&cell->bios); in __unlock()
326 if (cell->shared_count) { in __unlock()
327 cell->exclusive_lock = false; in __unlock()
331 rb_erase(&cell->node, &prison->cells); in __unlock()
336 struct dm_bio_prison_cell_v2 *cell, in dm_cell_unlock_v2() argument
342 r = __unlock(prison, cell, bios); in dm_cell_unlock_v2()