Lines Matching full:bmc

1291 		bitmap_counter_t *bmc;  in md_bitmap_daemon_work()  local
1303 bmc = md_bitmap_get_counter(counts, block, &blocks, 0); in md_bitmap_daemon_work()
1304 if (!bmc) { in md_bitmap_daemon_work()
1308 if (*bmc == 1 && !bitmap->need_sync) { in md_bitmap_daemon_work()
1310 *bmc = 0; in md_bitmap_daemon_work()
1313 } else if (*bmc && *bmc <= 2) { in md_bitmap_daemon_work()
1314 *bmc = 1; in md_bitmap_daemon_work()
1412 bitmap_counter_t *bmc; in md_bitmap_startwrite() local
1415 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1); in md_bitmap_startwrite()
1416 if (!bmc) { in md_bitmap_startwrite()
1421 if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) { in md_bitmap_startwrite()
1435 switch (*bmc) { in md_bitmap_startwrite()
1441 *bmc = 2; in md_bitmap_startwrite()
1444 (*bmc)++; in md_bitmap_startwrite()
1474 bitmap_counter_t *bmc; in md_bitmap_endwrite() local
1477 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0); in md_bitmap_endwrite()
1478 if (!bmc) { in md_bitmap_endwrite()
1490 if (!success && !NEEDED(*bmc)) in md_bitmap_endwrite()
1491 *bmc |= NEEDED_MASK; in md_bitmap_endwrite()
1493 if (COUNTER(*bmc) == COUNTER_MAX) in md_bitmap_endwrite()
1496 (*bmc)--; in md_bitmap_endwrite()
1497 if (*bmc <= 2) { in md_bitmap_endwrite()
1514 bitmap_counter_t *bmc; in __bitmap_start_sync() local
1521 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in __bitmap_start_sync()
1523 if (bmc) { in __bitmap_start_sync()
1525 if (RESYNC(*bmc)) in __bitmap_start_sync()
1527 else if (NEEDED(*bmc)) { in __bitmap_start_sync()
1530 *bmc |= RESYNC_MASK; in __bitmap_start_sync()
1531 *bmc &= ~NEEDED_MASK; in __bitmap_start_sync()
1565 bitmap_counter_t *bmc; in md_bitmap_end_sync() local
1573 bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0); in md_bitmap_end_sync()
1574 if (bmc == NULL) in md_bitmap_end_sync()
1577 if (RESYNC(*bmc)) { in md_bitmap_end_sync()
1578 *bmc &= ~RESYNC_MASK; in md_bitmap_end_sync()
1580 if (!NEEDED(*bmc) && aborted) in md_bitmap_end_sync()
1581 *bmc |= NEEDED_MASK; in md_bitmap_end_sync()
1583 if (*bmc <= 2) { in md_bitmap_end_sync()
1670 bitmap_counter_t *bmc; in md_bitmap_set_memory_bits() local
1672 bmc = md_bitmap_get_counter(&bitmap->counts, offset, &secs, 1); in md_bitmap_set_memory_bits()
1673 if (!bmc) { in md_bitmap_set_memory_bits()
1677 if (!*bmc) { in md_bitmap_set_memory_bits()
1678 *bmc = 2; in md_bitmap_set_memory_bits()
1684 *bmc |= NEEDED_MASK; in md_bitmap_set_memory_bits()
2230 bitmap_counter_t *bmc; in md_bitmap_resize() local
2231 bmc = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1); in md_bitmap_resize()
2232 if (bmc) { in md_bitmap_resize()
2236 if (*bmc == 0) { in md_bitmap_resize()
2237 *bmc = NEEDED_MASK | 2; in md_bitmap_resize()