Lines Matching refs:bzone

1686 	struct dm_zone *dzone, *bzone;  in dmz_load_mapping()  local
1751 bzone = dmz_get(zmd, bzone_id); in dmz_load_mapping()
1752 if (!bzone) { in dmz_load_mapping()
1757 if (!dmz_is_rnd(bzone) && !dmz_is_cache(bzone)) { in dmz_load_mapping()
1763 set_bit(DMZ_DATA, &bzone->flags); in dmz_load_mapping()
1764 set_bit(DMZ_BUF, &bzone->flags); in dmz_load_mapping()
1765 bzone->chunk = chunk; in dmz_load_mapping()
1766 bzone->bzone = dzone; in dmz_load_mapping()
1767 dzone->bzone = bzone; in dmz_load_mapping()
1768 dmz_get_zone_weight(zmd, bzone); in dmz_load_mapping()
1769 if (dmz_is_cache(bzone)) in dmz_load_mapping()
1770 list_add_tail(&bzone->link, &zmd->map_cache_list); in dmz_load_mapping()
1772 list_add_tail(&bzone->link, &bzone->dev->map_rnd_list); in dmz_load_mapping()
1875 if (zone->bzone) in dmz_lru_zone()
1876 __dmz_lru_zone(zmd, zone->bzone); in dmz_lru_zone()
1963 dzone = zone->bzone; in dmz_get_rnd_zone_for_reclaim()
1985 dzone = zone->bzone; in dmz_get_rnd_zone_for_reclaim()
2006 if (!zone->bzone) in dmz_get_seq_zone_for_reclaim()
2131 struct dm_zone *bzone; in dmz_put_chunk_mapping() local
2135 bzone = dzone->bzone; in dmz_put_chunk_mapping()
2136 if (bzone) { in dmz_put_chunk_mapping()
2137 if (dmz_weight(bzone)) in dmz_put_chunk_mapping()
2138 dmz_lru_zone(zmd, bzone); in dmz_put_chunk_mapping()
2141 dmz_unmap_zone(zmd, bzone); in dmz_put_chunk_mapping()
2142 dmz_free_zone(zmd, bzone); in dmz_put_chunk_mapping()
2143 bzone = NULL; in dmz_put_chunk_mapping()
2149 if (dmz_is_active(dzone) || bzone || dmz_weight(dzone)) in dmz_put_chunk_mapping()
2167 struct dm_zone *bzone; in dmz_get_chunk_buffer() local
2172 bzone = dzone->bzone; in dmz_get_chunk_buffer()
2173 if (bzone) in dmz_get_chunk_buffer()
2177 bzone = dmz_alloc_zone(zmd, 0, alloc_flags); in dmz_get_chunk_buffer()
2178 if (!bzone) { in dmz_get_chunk_buffer()
2180 bzone = ERR_PTR(-EIO); in dmz_get_chunk_buffer()
2188 dmz_set_chunk_mapping(zmd, dzone->chunk, dzone->id, bzone->id); in dmz_get_chunk_buffer()
2190 set_bit(DMZ_BUF, &bzone->flags); in dmz_get_chunk_buffer()
2191 bzone->chunk = dzone->chunk; in dmz_get_chunk_buffer()
2192 bzone->bzone = dzone; in dmz_get_chunk_buffer()
2193 dzone->bzone = bzone; in dmz_get_chunk_buffer()
2194 if (dmz_is_cache(bzone)) in dmz_get_chunk_buffer()
2195 list_add_tail(&bzone->link, &zmd->map_cache_list); in dmz_get_chunk_buffer()
2197 list_add_tail(&bzone->link, &bzone->dev->map_rnd_list); in dmz_get_chunk_buffer()
2201 return bzone; in dmz_get_chunk_buffer()
2346 dzone_id = zone->bzone->id; in dmz_unmap_zone()
2347 zone->bzone->bzone = NULL; in dmz_unmap_zone()
2348 zone->bzone = NULL; in dmz_unmap_zone()
2355 if (WARN_ON(zone->bzone)) { in dmz_unmap_zone()
2356 zone->bzone->bzone = NULL; in dmz_unmap_zone()
2357 zone->bzone = NULL; in dmz_unmap_zone()