Lines Matching refs:bm
109 struct dm_block_manager *bm; member
240 return dm_bm_read_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_read_lock()
247 return dm_bm_write_lock_zero(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock_zero()
254 return dm_bm_write_lock(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in superblock_lock()
260 static int __superblock_all_zeroes(struct dm_block_manager *bm, bool *result) in __superblock_all_zeroes() argument
266 unsigned sb_block_size = dm_bm_block_size(bm) / sizeof(__le64); in __superblock_all_zeroes()
271 r = dm_bm_read_lock(bm, CACHE_SUPERBLOCK_LOCATION, NULL, &b); in __superblock_all_zeroes()
394 r = dm_tm_create_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __format_metadata()
493 r = dm_tm_open_with_sm(cmd->bm, CACHE_SUPERBLOCK_LOCATION, in __open_metadata()
522 r = __superblock_all_zeroes(cmd->bm, &unformatted); in __open_or_format_metadata()
536 cmd->bm = dm_block_manager_create(cmd->bdev, DM_CACHE_METADATA_BLOCK_SIZE << SECTOR_SHIFT, in __create_persistent_data_objects()
538 if (IS_ERR(cmd->bm)) { in __create_persistent_data_objects()
540 r = PTR_ERR(cmd->bm); in __create_persistent_data_objects()
541 cmd->bm = NULL; in __create_persistent_data_objects()
547 dm_block_manager_destroy(cmd->bm); in __create_persistent_data_objects()
548 cmd->bm = NULL; in __create_persistent_data_objects()
560 dm_block_manager_destroy(cmd->bm); in __destroy_persistent_data_objects()
632 return dm_bm_flush(cmd->bm); in __begin_transaction_flags()
1001 if (cmd->fail_io || dm_bm_is_read_only(cmd->bm)) { in cmd_write_lock()
1766 dm_bm_set_read_only(cmd->bm); in dm_cache_metadata_set_read_only()
1773 dm_bm_set_read_write(cmd->bm); in dm_cache_metadata_set_read_write()
1836 old_bm = cmd->bm; in dm_cache_metadata_abort()
1839 cmd->bm = NULL; in dm_cache_metadata_abort()
1844 cmd->bm = new_bm; in dm_cache_metadata_abort()
1847 cmd->bm = NULL; in dm_cache_metadata_abort()