Lines Matching refs:cl

267 static void bch_write_bdev_super_unlock(struct closure *cl)  in bch_write_bdev_super_unlock()  argument
269 struct cached_dev *dc = container_of(cl, struct cached_dev, sb_write); in bch_write_bdev_super_unlock()
276 struct closure *cl = &dc->sb_write; in bch_write_bdev_super() local
280 closure_init(cl, parent); in bch_write_bdev_super()
287 closure_get(cl); in bch_write_bdev_super()
290 closure_return_with_destructor(cl, bch_write_bdev_super_unlock); in bch_write_bdev_super()
301 static void bcache_write_super_unlock(struct closure *cl) in bcache_write_super_unlock() argument
303 struct cache_set *c = container_of(cl, struct cache_set, sb_write); in bcache_write_super_unlock()
310 struct closure *cl = &c->sb_write; in bcache_write_super() local
315 closure_init(cl, &c->cl); in bcache_write_super()
333 closure_get(cl); in bcache_write_super()
337 closure_return_with_destructor(cl, bcache_write_super_unlock); in bcache_write_super()
344 struct closure *cl = bio->bi_private; in uuid_endio() local
345 struct cache_set *c = container_of(cl, struct cache_set, uuid_write); in uuid_endio()
349 closure_put(cl); in uuid_endio()
352 static void uuid_io_unlock(struct closure *cl) in uuid_io_unlock() argument
354 struct cache_set *c = container_of(cl, struct cache_set, uuid_write); in uuid_io_unlock()
362 struct closure *cl = &c->uuid_write; in uuid_io() local
369 closure_init(cl, parent); in uuid_io()
378 bio->bi_private = cl; in uuid_io()
396 closure_return_with_destructor(cl, uuid_io_unlock); in uuid_io()
399 static char *uuid_read(struct cache_set *c, struct jset *j, struct closure *cl) in uuid_read() argument
407 uuid_io(c, READ_SYNC, k, cl); in uuid_read()
414 closure_sync(cl); in uuid_read()
443 struct closure cl; in __uuid_write() local
444 closure_init_stack(&cl); in __uuid_write()
452 uuid_io(c, REQ_WRITE, &k.key, &cl); in __uuid_write()
453 closure_sync(&cl); in __uuid_write()
526 struct closure *cl = &ca->prio; in prio_io() local
529 closure_init_stack(cl); in prio_io()
541 closure_sync(cl); in prio_io()
548 struct closure cl; in bch_prio_write() local
550 closure_init_stack(&cl); in bch_prio_write()
592 bch_journal_meta(ca->set, &cl); in bch_prio_write()
593 closure_sync(&cl); in bch_prio_write()
650 closure_get(&d->cl); in open_dev()
657 closure_put(&d->cl); in release_dev()
677 closure_queue(&d->cl); in bcache_device_stop()
774 closure_debug_destroy(&d->cl); in bcache_device_free()
891 struct closure cl; in bch_cached_dev_run() local
892 closure_init_stack(&cl); in bch_cached_dev_run()
895 bch_write_bdev_super(dc, &cl); in bch_cached_dev_run()
896 closure_sync(&cl); in bch_cached_dev_run()
916 struct closure cl; in cached_dev_detach_finish() local
917 closure_init_stack(&cl); in cached_dev_detach_finish()
927 bch_write_bdev_super(dc, &cl); in cached_dev_detach_finish()
928 closure_sync(&cl); in cached_dev_detach_finish()
941 closure_put(&dc->disk.cl); in cached_dev_detach_finish()
958 closure_get(&dc->disk.cl); in bch_cached_dev_detach()
1020 struct closure cl; in bch_cached_dev_attach() local
1021 closure_init_stack(&cl); in bch_cached_dev_attach()
1031 bch_write_bdev_super(dc, &cl); in bch_cached_dev_attach()
1032 closure_sync(&cl); in bch_cached_dev_attach()
1083 static void cached_dev_free(struct closure *cl) in cached_dev_free() argument
1085 struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); in cached_dev_free()
1108 static void cached_dev_flush(struct closure *cl) in cached_dev_flush() argument
1110 struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); in cached_dev_flush()
1120 continue_at(cl, cached_dev_free, system_wq); in cached_dev_flush()
1131 closure_init(&dc->disk.cl, NULL); in cached_dev_init()
1132 set_closure_fn(&dc->disk.cl, cached_dev_flush, system_wq); in cached_dev_init()
1138 bch_cache_accounting_init(&dc->accounting, &dc->disk.cl); in cached_dev_init()
1225 static void flash_dev_free(struct closure *cl) in flash_dev_free() argument
1227 struct bcache_device *d = container_of(cl, struct bcache_device, cl); in flash_dev_free()
1234 static void flash_dev_flush(struct closure *cl) in flash_dev_flush() argument
1236 struct bcache_device *d = container_of(cl, struct bcache_device, cl); in flash_dev_flush()
1242 continue_at(cl, flash_dev_free, system_wq); in flash_dev_flush()
1252 closure_init(&d->cl, NULL); in flash_dev_run()
1253 set_closure_fn(&d->cl, flash_dev_flush, system_wq); in flash_dev_run()
1354 static void cache_set_free(struct closure *cl) in cache_set_free() argument
1356 struct cache_set *c = container_of(cl, struct cache_set, cl); in cache_set_free()
1396 closure_debug_destroy(&c->cl); in cache_set_free()
1400 static void cache_set_flush(struct closure *cl) in cache_set_flush() argument
1402 struct cache_set *c = container_of(cl, struct cache_set, caching); in cache_set_flush()
1408 closure_return(cl); in cache_set_flush()
1439 closure_return(cl); in cache_set_flush()
1442 static void __cache_set_unregister(struct closure *cl) in __cache_set_unregister() argument
1444 struct cache_set *c = container_of(cl, struct cache_set, caching); in __cache_set_unregister()
1464 continue_at(cl, cache_set_flush, system_wq); in __cache_set_unregister()
1490 closure_init(&c->cl, NULL); in bch_cache_set_alloc()
1491 set_closure_fn(&c->cl, cache_set_free, system_wq); in bch_cache_set_alloc()
1493 closure_init(&c->caching, &c->cl); in bch_cache_set_alloc()
1497 closure_set_stopped(&c->cl); in bch_cache_set_alloc()
1498 closure_put(&c->cl); in bch_cache_set_alloc()
1503 bch_cache_accounting_init(&c->accounting, &c->cl); in bch_cache_set_alloc()
1574 struct closure cl; in run_cache_set() local
1577 closure_init_stack(&cl); in run_cache_set()
1623 err = uuid_read(c, j, &cl); in run_cache_set()
1697 bch_btree_node_write(c->root, &cl); in run_cache_set()
1711 bch_journal_meta(c, &cl); in run_cache_set()
1718 closure_sync(&cl); in run_cache_set()
1730 closure_sync(&cl); in run_cache_set()