Lines Matching refs:page_nr

223 static void bm_page_lock_io(struct drbd_device *device, int page_nr)  in bm_page_lock_io()  argument
226 void *addr = &page_private(b->bm_pages[page_nr]); in bm_page_lock_io()
230 static void bm_page_unlock_io(struct drbd_device *device, int page_nr) in bm_page_unlock_io() argument
233 void *addr = &page_private(b->bm_pages[page_nr]); in bm_page_unlock_io()
266 void drbd_bm_mark_for_writeout(struct drbd_device *device, int page_nr) in drbd_bm_mark_for_writeout() argument
270 if (page_nr >= device->bitmap->bm_number_of_pages) { in drbd_bm_mark_for_writeout()
272 page_nr, (int)device->bitmap->bm_number_of_pages); in drbd_bm_mark_for_writeout()
275 page = device->bitmap->bm_pages[page_nr]; in drbd_bm_mark_for_writeout()
278 b->al_bitmap_hints[b->n_bitmap_hints++] = page_nr; in drbd_bm_mark_for_writeout()
311 unsigned int page_nr = long_nr >> (PAGE_SHIFT - LN2_BPL + 3); in bm_word_to_page_idx() local
312 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_word_to_page_idx()
313 return page_nr; in bm_word_to_page_idx()
319 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx() local
320 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_bit_to_page_idx()
321 return page_nr; in bm_bit_to_page_idx()
991 static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_hold(local) in bm_page_io_async() argument
1002 on_disk_sector += ((sector_t)page_nr) << (PAGE_SHIFT-9); in bm_page_io_async()
1011 bm_page_lock_io(device, page_nr); in bm_page_io_async()
1014 bm_set_page_unchanged(b->bm_pages[page_nr]); in bm_page_io_async()
1019 copy_highpage(page, b->bm_pages[page_nr]); in bm_page_io_async()
1020 bm_store_page_idx(page, page_nr); in bm_page_io_async()
1022 page = b->bm_pages[page_nr]; in bm_page_io_async()
1379 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to() local
1380 if (page_nr != last_page_nr) { in __bm_change_bits_to()
1389 p_addr = __bm_map_pidx(b, page_nr); in __bm_change_bits_to()
1390 last_page_nr = page_nr; in __bm_change_bits_to()
1449 int page_nr, int first_word, int last_word) in bm_set_full_words_within_one_page() argument
1454 unsigned long *paddr = kmap_atomic(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1468 bm_set_page_lazy_writeout(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1493 int page_nr; in _drbd_bm_set_bits() local
1522 for (page_nr = first_page; page_nr < last_page; page_nr++) { in _drbd_bm_set_bits()
1523 bm_set_full_words_within_one_page(device->bitmap, page_nr, first_word, last_word); in _drbd_bm_set_bits()
1595 unsigned int page_nr = -1U; in drbd_bm_count_bits() local
1612 if (page_nr != idx) { in drbd_bm_count_bits()
1613 page_nr = idx; in drbd_bm_count_bits()
1619 c += (0 != test_bit_le(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr)); in drbd_bm_count_bits()