Lines Matching full:bmc

1355 		bitmap_counter_t *bmc;  in md_bitmap_daemon_work()  local
1367 bmc = md_bitmap_get_counter(counts, block, &blocks, 0); in md_bitmap_daemon_work()
1368 if (!bmc) { in md_bitmap_daemon_work()
1372 if (*bmc == 1 && !bitmap->need_sync) { in md_bitmap_daemon_work()
1374 *bmc = 0; in md_bitmap_daemon_work()
1377 } else if (*bmc && *bmc <= 2) { in md_bitmap_daemon_work()
1378 *bmc = 1; in md_bitmap_daemon_work()
1482 bitmap_counter_t *bmc; in md_bitmap_startwrite() local
1485 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1); in md_bitmap_startwrite()
1486 if (!bmc) { in md_bitmap_startwrite()
1491 if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) { in md_bitmap_startwrite()
1505 switch (*bmc) { in md_bitmap_startwrite()
1511 *bmc = 2; in md_bitmap_startwrite()
1514 (*bmc)++; in md_bitmap_startwrite()
1544 bitmap_counter_t *bmc; in md_bitmap_endwrite() local
1547 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0); in md_bitmap_endwrite()
1548 if (!bmc) { in md_bitmap_endwrite()
1560 if (!success && !NEEDED(*bmc)) in md_bitmap_endwrite()
1561 *bmc |= NEEDED_MASK; in md_bitmap_endwrite()
1563 if (COUNTER(*bmc) == COUNTER_MAX) in md_bitmap_endwrite()
1566 (*bmc)--; in md_bitmap_endwrite()
1567 if (*bmc <= 2) { in md_bitmap_endwrite()
1584 bitmap_counter_t *bmc; in __bitmap_start_sync() local
1591 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_start_sync()
1593 if (bmc) { in __bitmap_start_sync()
1595 if (RESYNC(*bmc)) in __bitmap_start_sync()
1597 else if (NEEDED(*bmc)) { in __bitmap_start_sync()
1600 *bmc |= RESYNC_MASK; in __bitmap_start_sync()
1601 *bmc &= ~NEEDED_MASK; in __bitmap_start_sync()
1635 bitmap_counter_t *bmc; in md_bitmap_end_sync() local
1643 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in md_bitmap_end_sync()
1644 if (bmc == NULL) in md_bitmap_end_sync()
1647 if (RESYNC(*bmc)) { in md_bitmap_end_sync()
1648 *bmc &= ~RESYNC_MASK; in md_bitmap_end_sync()
1650 if (!NEEDED(*bmc) && aborted) in md_bitmap_end_sync()
1651 *bmc |= NEEDED_MASK; in md_bitmap_end_sync()
1653 if (*bmc <= 2) { in md_bitmap_end_sync()
1740 bitmap_counter_t *bmc; in md_bitmap_set_memory_bits() local
1742 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &secs, 1); in md_bitmap_set_memory_bits()
1743 if (!bmc) { in md_bitmap_set_memory_bits()
1747 if (!*bmc) { in md_bitmap_set_memory_bits()
1748 *bmc = 2; in md_bitmap_set_memory_bits()
1754 *bmc |= NEEDED_MASK; in md_bitmap_set_memory_bits()
2303 bitmap_counter_t *bmc; in md_bitmap_resize() local
2304 bmc = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1); in md_bitmap_resize()
2305 if (bmc) { in md_bitmap_resize()
2309 if (*bmc == 0) { in md_bitmap_resize()
2310 *bmc = NEEDED_MASK | 2; in md_bitmap_resize()