Lines Matching full:disk

32 	struct cache_set *c = dc->disk.c;  in __calc_target_rate()
84 int64_t dirty = bcache_dev_sectors_dirty(&dc->disk); in __update_writeback_rate()
178 struct cache_set *c = dc->disk.c; in update_writeback_rate()
184 set_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
192 if (!test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) || in update_writeback_rate()
194 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
220 if (test_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags) && in update_writeback_rate()
230 clear_bit(BCACHE_DEV_RATE_DW_RUNNING, &dc->disk.flags); in update_writeback_rate()
238 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) || in writeback_delay()
295 atomic_inc(&PTR_BUCKET(dc->disk.c, &w->key, i)->pin); in write_dirty_finish()
297 ret = bch_btree_insert(dc->disk.c, &keys, NULL, &w->key); in write_dirty_finish()
303 ? &dc->disk.c->writeback_keys_failed in write_dirty_finish()
304 : &dc->disk.c->writeback_keys_done); in write_dirty_finish()
366 closure_bio_submit(io->dc->disk.c, &io->bio, cl); in write_dirty()
381 bch_count_io_errors(PTR_CACHE(io->dc->disk.c, &w->key, 0), in read_dirty_endio()
392 closure_bio_submit(io->dc->disk.c, &io->bio, cl); in read_dirty_submit()
419 !test_bit(CACHE_SET_IO_DISABLE, &dc->disk.c->flags) && in read_dirty()
425 BUG_ON(ptr_stale(dc->disk.c, &next->key, 0)); in read_dirty()
476 PTR_CACHE(dc->disk.c, &w->key, 0)->bdev); in read_dirty()
497 !test_bit(CACHE_SET_IO_DISABLE, &dc->disk.c->flags) && in read_dirty()
568 BUG_ON(KEY_INODE(k) != dc->disk.id); in dirty_pred()
580 stripe = offset_to_stripe(&dc->disk, KEY_OFFSET(&buf->last_scanned)); in refill_full_stripes()
587 stripe = find_next_bit(dc->disk.full_dirty_stripes, in refill_full_stripes()
588 dc->disk.nr_stripes, stripe); in refill_full_stripes()
590 if (stripe == dc->disk.nr_stripes) in refill_full_stripes()
593 next_stripe = find_next_zero_bit(dc->disk.full_dirty_stripes, in refill_full_stripes()
594 dc->disk.nr_stripes, stripe); in refill_full_stripes()
596 buf->last_scanned = KEY(dc->disk.id, in refill_full_stripes()
597 stripe * dc->disk.stripe_size, 0); in refill_full_stripes()
599 bch_refill_keybuf(dc->disk.c, buf, in refill_full_stripes()
600 &KEY(dc->disk.id, in refill_full_stripes()
601 next_stripe * dc->disk.stripe_size, 0), in refill_full_stripes()
612 if (stripe == dc->disk.nr_stripes) { in refill_full_stripes()
620 * Returns true if we scanned the entire disk
625 struct bkey start = KEY(dc->disk.id, 0, 0); in refill_dirty()
626 struct bkey end = KEY(dc->disk.id, MAX_KEY_OFFSET, 0); in refill_dirty()
630 * make sure keybuf pos is inside the range for this disk - at bringup in refill_dirty()
631 * we might not be attached yet so this disk's inode nr isn't in refill_dirty()
645 bch_refill_keybuf(dc->disk.c, buf, &end, dirty_pred); in refill_dirty()
655 bch_refill_keybuf(dc->disk.c, buf, &start_pos, dirty_pred); in refill_dirty()
663 struct cache_set *c = dc->disk.c; in bch_writeback_thread()
679 if (!test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags) && in bch_writeback_thread()
707 if (test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) { in bch_writeback_thread()
740 !test_bit(BCACHE_DEV_DETACHING, &dc->disk.flags)) in bch_writeback_thread()
980 WARN_ON(test_and_clear_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); in bch_cached_dev_writeback_init()
1001 WARN_ON(test_and_set_bit(BCACHE_DEV_WB_RUNNING, &dc->disk.flags)); in bch_cached_dev_writeback_start()