Lines Matching refs:bzone
1701 struct dm_zone *dzone, *bzone; in dmz_load_mapping() local
1766 bzone = dmz_get(zmd, bzone_id); in dmz_load_mapping()
1767 if (!bzone) { in dmz_load_mapping()
1772 if (!dmz_is_rnd(bzone) && !dmz_is_cache(bzone)) { in dmz_load_mapping()
1778 set_bit(DMZ_DATA, &bzone->flags); in dmz_load_mapping()
1779 set_bit(DMZ_BUF, &bzone->flags); in dmz_load_mapping()
1780 bzone->chunk = chunk; in dmz_load_mapping()
1781 bzone->bzone = dzone; in dmz_load_mapping()
1782 dzone->bzone = bzone; in dmz_load_mapping()
1783 dmz_get_zone_weight(zmd, bzone); in dmz_load_mapping()
1784 if (dmz_is_cache(bzone)) in dmz_load_mapping()
1785 list_add_tail(&bzone->link, &zmd->map_cache_list); in dmz_load_mapping()
1787 list_add_tail(&bzone->link, &bzone->dev->map_rnd_list); in dmz_load_mapping()
1890 if (zone->bzone) in dmz_lru_zone()
1891 __dmz_lru_zone(zmd, zone->bzone); in dmz_lru_zone()
1978 dzone = zone->bzone; in dmz_get_rnd_zone_for_reclaim()
2000 dzone = zone->bzone; in dmz_get_rnd_zone_for_reclaim()
2021 if (!zone->bzone) in dmz_get_seq_zone_for_reclaim()
2145 struct dm_zone *bzone; in dmz_put_chunk_mapping() local
2149 bzone = dzone->bzone; in dmz_put_chunk_mapping()
2150 if (bzone) { in dmz_put_chunk_mapping()
2151 if (dmz_weight(bzone)) in dmz_put_chunk_mapping()
2152 dmz_lru_zone(zmd, bzone); in dmz_put_chunk_mapping()
2155 dmz_unmap_zone(zmd, bzone); in dmz_put_chunk_mapping()
2156 dmz_free_zone(zmd, bzone); in dmz_put_chunk_mapping()
2157 bzone = NULL; in dmz_put_chunk_mapping()
2163 if (dmz_is_active(dzone) || bzone || dmz_weight(dzone)) in dmz_put_chunk_mapping()
2181 struct dm_zone *bzone; in dmz_get_chunk_buffer() local
2186 bzone = dzone->bzone; in dmz_get_chunk_buffer()
2187 if (bzone) in dmz_get_chunk_buffer()
2191 bzone = dmz_alloc_zone(zmd, 0, alloc_flags); in dmz_get_chunk_buffer()
2192 if (!bzone) { in dmz_get_chunk_buffer()
2194 bzone = ERR_PTR(-EIO); in dmz_get_chunk_buffer()
2202 dmz_set_chunk_mapping(zmd, dzone->chunk, dzone->id, bzone->id); in dmz_get_chunk_buffer()
2204 set_bit(DMZ_BUF, &bzone->flags); in dmz_get_chunk_buffer()
2205 bzone->chunk = dzone->chunk; in dmz_get_chunk_buffer()
2206 bzone->bzone = dzone; in dmz_get_chunk_buffer()
2207 dzone->bzone = bzone; in dmz_get_chunk_buffer()
2208 if (dmz_is_cache(bzone)) in dmz_get_chunk_buffer()
2209 list_add_tail(&bzone->link, &zmd->map_cache_list); in dmz_get_chunk_buffer()
2211 list_add_tail(&bzone->link, &bzone->dev->map_rnd_list); in dmz_get_chunk_buffer()
2215 return bzone; in dmz_get_chunk_buffer()
2360 dzone_id = zone->bzone->id; in dmz_unmap_zone()
2361 zone->bzone->bzone = NULL; in dmz_unmap_zone()
2362 zone->bzone = NULL; in dmz_unmap_zone()
2369 if (WARN_ON(zone->bzone)) { in dmz_unmap_zone()
2370 zone->bzone->bzone = NULL; in dmz_unmap_zone()
2371 zone->bzone = NULL; in dmz_unmap_zone()