btree.c (9d13411784e27227162857df25ab6817a1db2a73) | btree.c (2831231d4c3f999d2d062b23dfbc8b0faa4bc6e0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2010 Kent Overstreet <kent.overstreet@gmail.com> 4 * 5 * Uses a block device as cache for other block devices; optimized for SSDs. 6 * All allocation is done in buckets, which should match the erase block size 7 * of the device. 8 * --- 1665 unchanged lines hidden (view full) --- 1674 c->need_gc = 0; 1675 1676 for (i = 0; i < KEY_PTRS(&c->uuid_bucket); i++) 1677 SET_GC_MARK(PTR_BUCKET(c, &c->uuid_bucket, i), 1678 GC_MARK_METADATA); 1679 1680 /* don't reclaim buckets to which writeback keys point */ 1681 rcu_read_lock(); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2010 Kent Overstreet <kent.overstreet@gmail.com> 4 * 5 * Uses a block device as cache for other block devices; optimized for SSDs. 6 * All allocation is done in buckets, which should match the erase block size 7 * of the device. 8 * --- 1665 unchanged lines hidden (view full) --- 1674 c->need_gc = 0; 1675 1676 for (i = 0; i < KEY_PTRS(&c->uuid_bucket); i++) 1677 SET_GC_MARK(PTR_BUCKET(c, &c->uuid_bucket, i), 1678 GC_MARK_METADATA); 1679 1680 /* don't reclaim buckets to which writeback keys point */ 1681 rcu_read_lock(); |
1682 for (i = 0; i < c->nr_uuids; i++) { | 1682 for (i = 0; i < c->devices_max_used; i++) { |
1683 struct bcache_device *d = c->devices[i]; 1684 struct cached_dev *dc; 1685 struct keybuf_key *w, *n; 1686 unsigned j; 1687 1688 if (!d || UUID_FLASH_ONLY(&c->uuids[i])) 1689 continue; 1690 dc = container_of(d, struct cached_dev, disk); --- 846 unchanged lines hidden --- | 1683 struct bcache_device *d = c->devices[i]; 1684 struct cached_dev *dc; 1685 struct keybuf_key *w, *n; 1686 unsigned j; 1687 1688 if (!d || UUID_FLASH_ONLY(&c->uuids[i])) 1689 continue; 1690 dc = container_of(d, struct cached_dev, disk); --- 846 unchanged lines hidden --- |