• Home
  • Raw
  • Download

Lines Matching refs:bitnr

304 static unsigned int bm_bit_to_page_idx(struct drbd_bitmap *b, u64 bitnr)  in bm_bit_to_page_idx()  argument
307 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx()
1354 unsigned long bitnr; in __bm_change_bits_to() local
1364 for (bitnr = s; bitnr <= e; bitnr++) { in __bm_change_bits_to()
1365 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to()
1379 c += (0 == __test_and_set_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr)); in __bm_change_bits_to()
1381 c -= (0 != __test_and_clear_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr)); in __bm_change_bits_to()
1544 int drbd_bm_test_bit(struct drbd_device *device, const unsigned long bitnr) in drbd_bm_test_bit() argument
1559 if (bitnr < b->bm_bits) { in drbd_bm_test_bit()
1560 p_addr = bm_map_pidx(b, bm_bit_to_page_idx(b, bitnr)); in drbd_bm_test_bit()
1561 i = test_bit_le(bitnr & BITS_PER_PAGE_MASK, p_addr) ? 1 : 0; in drbd_bm_test_bit()
1563 } else if (bitnr == b->bm_bits) { in drbd_bm_test_bit()
1566 drbd_err(device, "bitnr=%lu > bm_bits=%lu\n", bitnr, b->bm_bits); in drbd_bm_test_bit()
1580 unsigned long bitnr; in drbd_bm_count_bits() local
1596 for (bitnr = s; bitnr <= e; bitnr++) { in drbd_bm_count_bits()
1597 unsigned int idx = bm_bit_to_page_idx(b, bitnr); in drbd_bm_count_bits()
1604 if (expect(bitnr < b->bm_bits)) in drbd_bm_count_bits()
1605 c += (0 != test_bit_le(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr)); in drbd_bm_count_bits()
1607 drbd_err(device, "bitnr=%lu bm_bits=%lu\n", bitnr, b->bm_bits); in drbd_bm_count_bits()