Lines Matching refs:zmd

62 	struct dmz_metadata *zmd = zrc->metadata;  in dmz_reclaim_align_wp()  local
80 dmz_start_sect(zmd, zone) + dmz_blk2sect(wp_block), in dmz_reclaim_align_wp()
120 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_copy() local
132 end_block = dmz_zone_nr_blocks(zmd); in dmz_reclaim_copy()
133 src_zone_block = dmz_start_block(zmd, src_zone); in dmz_reclaim_copy()
134 dst_zone_block = dmz_start_block(zmd, dst_zone); in dmz_reclaim_copy()
149 ret = dmz_first_valid_block(zmd, src_zone, &block); in dmz_reclaim_copy()
200 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_buf() local
204 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_reclaim_buf()
213 dmz_lock_flush(zmd); in dmz_reclaim_buf()
216 ret = dmz_merge_valid_blocks(zmd, bzone, dzone, chunk_block); in dmz_reclaim_buf()
219 dmz_invalidate_blocks(zmd, bzone, 0, dmz_zone_nr_blocks(zmd)); in dmz_reclaim_buf()
220 dmz_lock_map(zmd); in dmz_reclaim_buf()
221 dmz_unmap_zone(zmd, bzone); in dmz_reclaim_buf()
223 dmz_free_zone(zmd, bzone); in dmz_reclaim_buf()
224 dmz_unlock_map(zmd); in dmz_reclaim_buf()
227 dmz_unlock_flush(zmd); in dmz_reclaim_buf()
239 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_seq_data() local
243 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_reclaim_seq_data()
252 dmz_lock_flush(zmd); in dmz_reclaim_seq_data()
255 ret = dmz_merge_valid_blocks(zmd, dzone, bzone, 0); in dmz_reclaim_seq_data()
261 dmz_invalidate_blocks(zmd, dzone, 0, dmz_zone_nr_blocks(zmd)); in dmz_reclaim_seq_data()
262 dmz_lock_map(zmd); in dmz_reclaim_seq_data()
263 dmz_unmap_zone(zmd, bzone); in dmz_reclaim_seq_data()
264 dmz_unmap_zone(zmd, dzone); in dmz_reclaim_seq_data()
266 dmz_free_zone(zmd, dzone); in dmz_reclaim_seq_data()
267 dmz_map_zone(zmd, bzone, chunk); in dmz_reclaim_seq_data()
268 dmz_unlock_map(zmd); in dmz_reclaim_seq_data()
271 dmz_unlock_flush(zmd); in dmz_reclaim_seq_data()
284 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_rnd_data() local
289 dmz_lock_map(zmd); in dmz_reclaim_rnd_data()
291 szone = dmz_alloc_zone(zmd, zrc->dev_idx, in dmz_reclaim_rnd_data()
293 if (!szone && alloc_flags == DMZ_ALLOC_SEQ && dmz_nr_cache_zones(zmd)) { in dmz_reclaim_rnd_data()
297 dmz_unlock_map(zmd); in dmz_reclaim_rnd_data()
302 dmz_metadata_label(zmd), zrc->dev_idx, chunk, in dmz_reclaim_rnd_data()
310 dmz_lock_flush(zmd); in dmz_reclaim_rnd_data()
314 ret = dmz_copy_valid_blocks(zmd, dzone, szone); in dmz_reclaim_rnd_data()
318 dmz_lock_map(zmd); in dmz_reclaim_rnd_data()
319 dmz_free_zone(zmd, szone); in dmz_reclaim_rnd_data()
320 dmz_unlock_map(zmd); in dmz_reclaim_rnd_data()
323 dmz_invalidate_blocks(zmd, dzone, 0, dmz_zone_nr_blocks(zmd)); in dmz_reclaim_rnd_data()
324 dmz_lock_map(zmd); in dmz_reclaim_rnd_data()
325 dmz_unmap_zone(zmd, dzone); in dmz_reclaim_rnd_data()
327 dmz_free_zone(zmd, dzone); in dmz_reclaim_rnd_data()
328 dmz_map_zone(zmd, szone, chunk); in dmz_reclaim_rnd_data()
329 dmz_unlock_map(zmd); in dmz_reclaim_rnd_data()
332 dmz_unlock_flush(zmd); in dmz_reclaim_rnd_data()
342 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_empty() local
344 dmz_lock_flush(zmd); in dmz_reclaim_empty()
345 dmz_lock_map(zmd); in dmz_reclaim_empty()
346 dmz_unmap_zone(zmd, dzone); in dmz_reclaim_empty()
348 dmz_free_zone(zmd, dzone); in dmz_reclaim_empty()
349 dmz_unlock_map(zmd); in dmz_reclaim_empty()
350 dmz_unlock_flush(zmd); in dmz_reclaim_empty()
366 struct dmz_metadata *zmd = zrc->metadata; in dmz_do_reclaim() local
373 dzone = dmz_get_zone_for_reclaim(zmd, zrc->dev_idx, in dmz_do_reclaim()
377 dmz_metadata_label(zmd), zrc->dev_idx); in dmz_do_reclaim()
399 ret = dmz_first_valid_block(zmd, bzone, &chunk_block); in dmz_do_reclaim()
423 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_do_reclaim()
427 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_do_reclaim()
436 dmz_metadata_label(zmd), zrc->dev_idx, rzone->id, ret); in dmz_do_reclaim()
441 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_do_reclaim()
448 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_percentage() local
449 unsigned int nr_cache = dmz_nr_cache_zones(zmd); in dmz_reclaim_percentage()
454 nr_unmap = dmz_nr_unmap_cache_zones(zmd); in dmz_reclaim_percentage()
456 nr_zones = dmz_nr_rnd_zones(zmd, zrc->dev_idx); in dmz_reclaim_percentage()
457 nr_unmap = dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx); in dmz_reclaim_percentage()
505 struct dmz_metadata *zmd = zrc->metadata; in dmz_reclaim_work() local
509 if (dmz_dev_is_dying(zmd)) in dmz_reclaim_work()
533 dmz_metadata_label(zmd), zrc->dev_idx, in dmz_reclaim_work()
536 p_unmap, dmz_nr_unmap_cache_zones(zmd), in dmz_reclaim_work()
537 dmz_nr_cache_zones(zmd), in dmz_reclaim_work()
538 dmz_nr_unmap_rnd_zones(zmd, zrc->dev_idx), in dmz_reclaim_work()
539 dmz_nr_rnd_zones(zmd, zrc->dev_idx)); in dmz_reclaim_work()
543 if (!dmz_check_dev(zmd)) in dmz_reclaim_work()
553 int dmz_ctr_reclaim(struct dmz_metadata *zmd, in dmz_ctr_reclaim() argument
563 zrc->metadata = zmd; in dmz_ctr_reclaim()
578 dmz_metadata_label(zmd), idx); in dmz_ctr_reclaim()