Lines Matching refs:cl

244 static void bch_write_bdev_super_unlock(struct closure *cl)  in bch_write_bdev_super_unlock()  argument
246 struct cached_dev *dc = container_of(cl, struct cached_dev, sb_write); in bch_write_bdev_super_unlock()
253 struct closure *cl = &dc->sb_write; in bch_write_bdev_super() local
257 closure_init(cl, parent); in bch_write_bdev_super()
264 closure_get(cl); in bch_write_bdev_super()
267 closure_return_with_destructor(cl, bch_write_bdev_super_unlock); in bch_write_bdev_super()
278 static void bcache_write_super_unlock(struct closure *cl) in bcache_write_super_unlock() argument
280 struct cache_set *c = container_of(cl, struct cache_set, sb_write); in bcache_write_super_unlock()
287 struct closure *cl = &c->sb_write; in bcache_write_super() local
292 closure_init(cl, &c->cl); in bcache_write_super()
310 closure_get(cl); in bcache_write_super()
314 closure_return_with_destructor(cl, bcache_write_super_unlock); in bcache_write_super()
321 struct closure *cl = bio->bi_private; in uuid_endio() local
322 struct cache_set *c = container_of(cl, struct cache_set, uuid_write); in uuid_endio()
326 closure_put(cl); in uuid_endio()
329 static void uuid_io_unlock(struct closure *cl) in uuid_io_unlock() argument
331 struct cache_set *c = container_of(cl, struct cache_set, uuid_write); in uuid_io_unlock()
339 struct closure *cl = &c->uuid_write; in uuid_io() local
346 closure_init(cl, parent); in uuid_io()
355 bio->bi_private = cl; in uuid_io()
373 closure_return_with_destructor(cl, uuid_io_unlock); in uuid_io()
376 static char *uuid_read(struct cache_set *c, struct jset *j, struct closure *cl) in uuid_read() argument
384 uuid_io(c, READ_SYNC, k, cl); in uuid_read()
391 closure_sync(cl); in uuid_read()
420 struct closure cl; in __uuid_write() local
421 closure_init_stack(&cl); in __uuid_write()
429 uuid_io(c, REQ_WRITE, &k.key, &cl); in __uuid_write()
430 closure_sync(&cl); in __uuid_write()
503 struct closure *cl = &ca->prio; in prio_io() local
506 closure_init_stack(cl); in prio_io()
518 closure_sync(cl); in prio_io()
525 struct closure cl; in bch_prio_write() local
527 closure_init_stack(&cl); in bch_prio_write()
569 bch_journal_meta(ca->set, &cl); in bch_prio_write()
570 closure_sync(&cl); in bch_prio_write()
627 closure_get(&d->cl); in open_dev()
634 closure_put(&d->cl); in release_dev()
654 closure_queue(&d->cl); in bcache_device_stop()
744 closure_debug_destroy(&d->cl); in bcache_device_free()
860 struct closure cl; in bch_cached_dev_run() local
861 closure_init_stack(&cl); in bch_cached_dev_run()
864 bch_write_bdev_super(dc, &cl); in bch_cached_dev_run()
865 closure_sync(&cl); in bch_cached_dev_run()
885 struct closure cl; in cached_dev_detach_finish() local
886 closure_init_stack(&cl); in cached_dev_detach_finish()
896 bch_write_bdev_super(dc, &cl); in cached_dev_detach_finish()
897 closure_sync(&cl); in cached_dev_detach_finish()
910 closure_put(&dc->disk.cl); in cached_dev_detach_finish()
927 closure_get(&dc->disk.cl); in bch_cached_dev_detach()
989 struct closure cl; in bch_cached_dev_attach() local
990 closure_init_stack(&cl); in bch_cached_dev_attach()
1000 bch_write_bdev_super(dc, &cl); in bch_cached_dev_attach()
1001 closure_sync(&cl); in bch_cached_dev_attach()
1052 static void cached_dev_free(struct closure *cl) in cached_dev_free() argument
1054 struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); in cached_dev_free()
1077 static void cached_dev_flush(struct closure *cl) in cached_dev_flush() argument
1079 struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); in cached_dev_flush()
1089 continue_at(cl, cached_dev_free, system_wq); in cached_dev_flush()
1100 closure_init(&dc->disk.cl, NULL); in cached_dev_init()
1101 set_closure_fn(&dc->disk.cl, cached_dev_flush, system_wq); in cached_dev_init()
1107 bch_cache_accounting_init(&dc->accounting, &dc->disk.cl); in cached_dev_init()
1194 static void flash_dev_free(struct closure *cl) in flash_dev_free() argument
1196 struct bcache_device *d = container_of(cl, struct bcache_device, cl); in flash_dev_free()
1203 static void flash_dev_flush(struct closure *cl) in flash_dev_flush() argument
1205 struct bcache_device *d = container_of(cl, struct bcache_device, cl); in flash_dev_flush()
1211 continue_at(cl, flash_dev_free, system_wq); in flash_dev_flush()
1221 closure_init(&d->cl, NULL); in flash_dev_run()
1222 set_closure_fn(&d->cl, flash_dev_flush, system_wq); in flash_dev_run()
1323 static void cache_set_free(struct closure *cl) in cache_set_free() argument
1325 struct cache_set *c = container_of(cl, struct cache_set, cl); in cache_set_free()
1365 closure_debug_destroy(&c->cl); in cache_set_free()
1369 static void cache_set_flush(struct closure *cl) in cache_set_flush() argument
1371 struct cache_set *c = container_of(cl, struct cache_set, caching); in cache_set_flush()
1377 closure_return(cl); in cache_set_flush()
1408 closure_return(cl); in cache_set_flush()
1411 static void __cache_set_unregister(struct closure *cl) in __cache_set_unregister() argument
1413 struct cache_set *c = container_of(cl, struct cache_set, caching); in __cache_set_unregister()
1433 continue_at(cl, cache_set_flush, system_wq); in __cache_set_unregister()
1459 closure_init(&c->cl, NULL); in bch_cache_set_alloc()
1460 set_closure_fn(&c->cl, cache_set_free, system_wq); in bch_cache_set_alloc()
1462 closure_init(&c->caching, &c->cl); in bch_cache_set_alloc()
1466 closure_set_stopped(&c->cl); in bch_cache_set_alloc()
1467 closure_put(&c->cl); in bch_cache_set_alloc()
1472 bch_cache_accounting_init(&c->accounting, &c->cl); in bch_cache_set_alloc()
1543 struct closure cl; in run_cache_set() local
1546 closure_init_stack(&cl); in run_cache_set()
1592 err = uuid_read(c, j, &cl); in run_cache_set()
1666 bch_btree_node_write(c->root, &cl); in run_cache_set()
1680 bch_journal_meta(c, &cl); in run_cache_set()
1687 closure_sync(&cl); in run_cache_set()
1699 closure_sync(&cl); in run_cache_set()