Lines Matching full:bmc
1289 bitmap_counter_t *bmc; in md_bitmap_daemon_work() local
1301 bmc = md_bitmap_get_counter(counts, block, &blocks, 0); in md_bitmap_daemon_work()
1302 if (!bmc) { in md_bitmap_daemon_work()
1306 if (*bmc == 1 && !bitmap->need_sync) { in md_bitmap_daemon_work()
1308 *bmc = 0; in md_bitmap_daemon_work()
1311 } else if (*bmc && *bmc <= 2) { in md_bitmap_daemon_work()
1312 *bmc = 1; in md_bitmap_daemon_work()
1410 bitmap_counter_t *bmc; in md_bitmap_startwrite() local
1413 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1); in md_bitmap_startwrite()
1414 if (!bmc) { in md_bitmap_startwrite()
1419 if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) { in md_bitmap_startwrite()
1433 switch (*bmc) { in md_bitmap_startwrite()
1439 *bmc = 2; in md_bitmap_startwrite()
1442 (*bmc)++; in md_bitmap_startwrite()
1472 bitmap_counter_t *bmc; in md_bitmap_endwrite() local
1475 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0); in md_bitmap_endwrite()
1476 if (!bmc) { in md_bitmap_endwrite()
1488 if (!success && !NEEDED(*bmc)) in md_bitmap_endwrite()
1489 *bmc |= NEEDED_MASK; in md_bitmap_endwrite()
1491 if (COUNTER(*bmc) == COUNTER_MAX) in md_bitmap_endwrite()
1494 (*bmc)--; in md_bitmap_endwrite()
1495 if (*bmc <= 2) { in md_bitmap_endwrite()
1512 bitmap_counter_t *bmc; in __bitmap_start_sync() local
1519 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_start_sync()
1521 if (bmc) { in __bitmap_start_sync()
1523 if (RESYNC(*bmc)) in __bitmap_start_sync()
1525 else if (NEEDED(*bmc)) { in __bitmap_start_sync()
1528 *bmc |= RESYNC_MASK; in __bitmap_start_sync()
1529 *bmc &= ~NEEDED_MASK; in __bitmap_start_sync()
1563 bitmap_counter_t *bmc; in md_bitmap_end_sync() local
1571 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in md_bitmap_end_sync()
1572 if (bmc == NULL) in md_bitmap_end_sync()
1575 if (RESYNC(*bmc)) { in md_bitmap_end_sync()
1576 *bmc &= ~RESYNC_MASK; in md_bitmap_end_sync()
1578 if (!NEEDED(*bmc) && aborted) in md_bitmap_end_sync()
1579 *bmc |= NEEDED_MASK; in md_bitmap_end_sync()
1581 if (*bmc <= 2) { in md_bitmap_end_sync()
1668 bitmap_counter_t *bmc; in md_bitmap_set_memory_bits() local
1670 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &secs, 1); in md_bitmap_set_memory_bits()
1671 if (!bmc) { in md_bitmap_set_memory_bits()
1675 if (!*bmc) { in md_bitmap_set_memory_bits()
1676 *bmc = 2; in md_bitmap_set_memory_bits()
1682 *bmc |= NEEDED_MASK; in md_bitmap_set_memory_bits()
2226 bitmap_counter_t *bmc; in md_bitmap_resize() local
2227 bmc = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1); in md_bitmap_resize()
2228 if (bmc) { in md_bitmap_resize()
2232 if (*bmc == 0) { in md_bitmap_resize()
2233 *bmc = NEEDED_MASK | 2; in md_bitmap_resize()