Lines Matching refs:zmd
172 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_read() local
173 sector_t chunk_block = dmz_chunk_block(zmd, dmz_bio_block(bio)); in dmz_handle_read()
186 dmz_metadata_label(zmd), in dmz_handle_read()
187 (unsigned long long)dmz_bio_chunk(zmd, bio), in dmz_handle_read()
200 ret = dmz_block_valid(zmd, zone, chunk_block); in dmz_handle_read()
215 ret = dmz_block_valid(zmd, bzone, chunk_block); in dmz_handle_read()
254 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_direct_write() local
270 ret = dmz_validate_blocks(zmd, zone, chunk_block, nr_blocks); in dmz_handle_direct_write()
272 ret = dmz_invalidate_blocks(zmd, bzone, chunk_block, nr_blocks); in dmz_handle_direct_write()
287 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_buffered_write() local
292 bzone = dmz_get_chunk_buffer(zmd, zone); in dmz_handle_buffered_write()
308 ret = dmz_validate_blocks(zmd, bzone, chunk_block, nr_blocks); in dmz_handle_buffered_write()
310 ret = dmz_invalidate_blocks(zmd, zone, chunk_block, nr_blocks); in dmz_handle_buffered_write()
321 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_write() local
322 sector_t chunk_block = dmz_chunk_block(zmd, dmz_bio_block(bio)); in dmz_handle_write()
329 dmz_metadata_label(zmd), in dmz_handle_write()
330 (unsigned long long)dmz_bio_chunk(zmd, bio), in dmz_handle_write()
360 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_discard() local
363 sector_t chunk_block = dmz_chunk_block(zmd, block); in dmz_handle_discard()
375 (unsigned long long)dmz_bio_chunk(zmd, bio), in dmz_handle_discard()
385 ret = dmz_invalidate_blocks(zmd, zone, chunk_block, nr_blocks); in dmz_handle_discard()
387 ret = dmz_invalidate_blocks(zmd, zone->bzone, in dmz_handle_discard()
400 struct dmz_metadata *zmd = dmz->metadata; in dmz_handle_bio() local
404 dmz_lock_metadata(zmd); in dmz_handle_bio()
411 zone = dmz_get_chunk_mapping(zmd, dmz_bio_chunk(zmd, bio), in dmz_handle_bio()
447 dmz_put_chunk_mapping(zmd, zone); in dmz_handle_bio()
451 dmz_unlock_metadata(zmd); in dmz_handle_bio()
628 struct dmz_metadata *zmd = dmz->metadata; in dmz_map() local
635 if (dmz_dev_is_dying(zmd)) in dmz_map()
639 dmz_metadata_label(zmd), in dmz_map()
641 (unsigned long long)dmz_bio_chunk(zmd, bio), in dmz_map()
642 (unsigned long long)dmz_chunk_block(zmd, dmz_bio_block(bio)), in dmz_map()
668 chunk_sector = sector & (dmz_zone_nr_sectors(zmd) - 1); in dmz_map()
669 if (chunk_sector + nr_sectors > dmz_zone_nr_sectors(zmd)) in dmz_map()
670 dm_accept_partial_bio(bio, dmz_zone_nr_sectors(zmd) - chunk_sector); in dmz_map()
676 dmz_metadata_label(zmd), in dmz_map()
677 bio_op(bio), (u64)dmz_bio_chunk(zmd, bio), in dmz_map()