Lines Matching refs:bmc

1290 		bitmap_counter_t *bmc;  in md_bitmap_daemon_work()  local
1302 bmc = md_bitmap_get_counter(counts, block, &blocks, 0); in md_bitmap_daemon_work()
1303 if (!bmc) { in md_bitmap_daemon_work()
1307 if (*bmc == 1 && !bitmap->need_sync) { in md_bitmap_daemon_work()
1309 *bmc = 0; in md_bitmap_daemon_work()
1312 } else if (*bmc && *bmc <= 2) { in md_bitmap_daemon_work()
1313 *bmc = 1; in md_bitmap_daemon_work()
1411 bitmap_counter_t *bmc; in md_bitmap_startwrite() local
1414 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1); in md_bitmap_startwrite()
1415 if (!bmc) { in md_bitmap_startwrite()
1420 if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) { in md_bitmap_startwrite()
1434 switch (*bmc) { in md_bitmap_startwrite()
1440 *bmc = 2; in md_bitmap_startwrite()
1443 (*bmc)++; in md_bitmap_startwrite()
1473 bitmap_counter_t *bmc; in md_bitmap_endwrite() local
1476 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0); in md_bitmap_endwrite()
1477 if (!bmc) { in md_bitmap_endwrite()
1489 if (!success && !NEEDED(*bmc)) in md_bitmap_endwrite()
1490 *bmc |= NEEDED_MASK; in md_bitmap_endwrite()
1492 if (COUNTER(*bmc) == COUNTER_MAX) in md_bitmap_endwrite()
1495 (*bmc)--; in md_bitmap_endwrite()
1496 if (*bmc <= 2) { in md_bitmap_endwrite()
1513 bitmap_counter_t *bmc; in __bitmap_start_sync() local
1520 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_start_sync()
1522 if (bmc) { in __bitmap_start_sync()
1524 if (RESYNC(*bmc)) in __bitmap_start_sync()
1526 else if (NEEDED(*bmc)) { in __bitmap_start_sync()
1529 *bmc |= RESYNC_MASK; in __bitmap_start_sync()
1530 *bmc &= ~NEEDED_MASK; in __bitmap_start_sync()
1564 bitmap_counter_t *bmc; in md_bitmap_end_sync() local
1572 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in md_bitmap_end_sync()
1573 if (bmc == NULL) in md_bitmap_end_sync()
1576 if (RESYNC(*bmc)) { in md_bitmap_end_sync()
1577 *bmc &= ~RESYNC_MASK; in md_bitmap_end_sync()
1579 if (!NEEDED(*bmc) && aborted) in md_bitmap_end_sync()
1580 *bmc |= NEEDED_MASK; in md_bitmap_end_sync()
1582 if (*bmc <= 2) { in md_bitmap_end_sync()
1669 bitmap_counter_t *bmc; in md_bitmap_set_memory_bits() local
1671 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &secs, 1); in md_bitmap_set_memory_bits()
1672 if (!bmc) { in md_bitmap_set_memory_bits()
1676 if (!*bmc) { in md_bitmap_set_memory_bits()
1677 *bmc = 2; in md_bitmap_set_memory_bits()
1683 *bmc |= NEEDED_MASK; in md_bitmap_set_memory_bits()
2233 bitmap_counter_t *bmc; in md_bitmap_resize() local
2234 bmc = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1); in md_bitmap_resize()
2235 if (bmc) { in md_bitmap_resize()
2239 if (*bmc == 0) { in md_bitmap_resize()
2240 *bmc = NEEDED_MASK | 2; in md_bitmap_resize()