Lines Matching refs:b

31 static unsigned prefetch_hash(dm_block_t b)  in prefetch_hash()  argument
33 return hash_64(b, PREFETCH_BITS); in prefetch_hash()
49 static void prefetch_add(struct prefetch_set *p, dm_block_t b) in prefetch_add() argument
51 unsigned h = prefetch_hash(b); in prefetch_add()
55 p->blocks[h] = b; in prefetch_add()
103 static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) in is_shadow() argument
106 unsigned bucket = dm_hash_block(b, DM_HASH_MASK); in is_shadow()
111 if (si->where == b) { in is_shadow()
124 static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) in insert_shadow() argument
131 si->where = b; in insert_shadow()
132 bucket = dm_hash_block(b, DM_HASH_MASK); in insert_shadow()
328 int dm_tm_read_lock(struct dm_transaction_manager *tm, dm_block_t b, in dm_tm_read_lock() argument
333 int r = dm_bm_read_try_lock(tm->real->bm, b, v, blk); in dm_tm_read_lock()
336 prefetch_add(&tm->real->prefetches, b); in dm_tm_read_lock()
341 return dm_bm_read_lock(tm->bm, b, v, blk); in dm_tm_read_lock()
345 void dm_tm_unlock(struct dm_transaction_manager *tm, struct dm_block *b) in dm_tm_unlock() argument
347 dm_bm_unlock(b); in dm_tm_unlock()
351 void dm_tm_inc(struct dm_transaction_manager *tm, dm_block_t b) in dm_tm_inc() argument
358 dm_sm_inc_block(tm->sm, b); in dm_tm_inc()
362 void dm_tm_dec(struct dm_transaction_manager *tm, dm_block_t b) in dm_tm_dec() argument
369 dm_sm_dec_block(tm->sm, b); in dm_tm_dec()
373 int dm_tm_ref(struct dm_transaction_manager *tm, dm_block_t b, in dm_tm_ref() argument
379 return dm_sm_get_count(tm->sm, b, result); in dm_tm_ref()