Lines Matching refs:page_nr
216 static void bm_page_lock_io(struct drbd_device *device, int page_nr) in bm_page_lock_io() argument
219 void *addr = &page_private(b->bm_pages[page_nr]); in bm_page_lock_io()
223 static void bm_page_unlock_io(struct drbd_device *device, int page_nr) in bm_page_unlock_io() argument
226 void *addr = &page_private(b->bm_pages[page_nr]); in bm_page_unlock_io()
254 void drbd_bm_mark_for_writeout(struct drbd_device *device, int page_nr) in drbd_bm_mark_for_writeout() argument
257 if (page_nr >= device->bitmap->bm_number_of_pages) { in drbd_bm_mark_for_writeout()
259 page_nr, (int)device->bitmap->bm_number_of_pages); in drbd_bm_mark_for_writeout()
262 page = device->bitmap->bm_pages[page_nr]; in drbd_bm_mark_for_writeout()
296 unsigned int page_nr = long_nr >> (PAGE_SHIFT - LN2_BPL + 3); in bm_word_to_page_idx() local
297 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_word_to_page_idx()
298 return page_nr; in bm_word_to_page_idx()
304 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx() local
305 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_bit_to_page_idx()
306 return page_nr; in bm_bit_to_page_idx()
993 static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_hold(local) in bm_page_io_async() argument
1004 on_disk_sector += ((sector_t)page_nr) << (PAGE_SHIFT-9); in bm_page_io_async()
1013 bm_page_lock_io(device, page_nr); in bm_page_io_async()
1016 bm_set_page_unchanged(b->bm_pages[page_nr]); in bm_page_io_async()
1020 copy_highpage(page, b->bm_pages[page_nr]); in bm_page_io_async()
1021 bm_store_page_idx(page, page_nr); in bm_page_io_async()
1023 page = b->bm_pages[page_nr]; in bm_page_io_async()
1355 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to() local
1356 if (page_nr != last_page_nr) { in __bm_change_bits_to()
1365 p_addr = __bm_map_pidx(b, page_nr); in __bm_change_bits_to()
1366 last_page_nr = page_nr; in __bm_change_bits_to()
1425 int page_nr, int first_word, int last_word) in bm_set_full_words_within_one_page() argument
1430 unsigned long *paddr = kmap_atomic(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1441 bm_set_page_lazy_writeout(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1466 int page_nr; in _drbd_bm_set_bits() local
1495 for (page_nr = first_page; page_nr < last_page; page_nr++) { in _drbd_bm_set_bits()
1496 bm_set_full_words_within_one_page(device->bitmap, page_nr, first_word, last_word); in _drbd_bm_set_bits()
1568 unsigned int page_nr = -1U; in drbd_bm_count_bits() local
1585 if (page_nr != idx) { in drbd_bm_count_bits()
1586 page_nr = idx; in drbd_bm_count_bits()
1592 c += (0 != test_bit_le(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr)); in drbd_bm_count_bits()