Lines Matching refs:page_nr
211 static void bm_page_lock_io(struct drbd_device *device, int page_nr) in bm_page_lock_io() argument
214 void *addr = &page_private(b->bm_pages[page_nr]); in bm_page_lock_io()
218 static void bm_page_unlock_io(struct drbd_device *device, int page_nr) in bm_page_unlock_io() argument
221 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
258 if (page_nr >= device->bitmap->bm_number_of_pages) { in drbd_bm_mark_for_writeout()
260 page_nr, (int)device->bitmap->bm_number_of_pages); in drbd_bm_mark_for_writeout()
263 page = device->bitmap->bm_pages[page_nr]; in drbd_bm_mark_for_writeout()
266 b->al_bitmap_hints[b->n_bitmap_hints++] = page_nr; in drbd_bm_mark_for_writeout()
299 unsigned int page_nr = long_nr >> (PAGE_SHIFT - LN2_BPL + 3); in bm_word_to_page_idx() local
300 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_word_to_page_idx()
301 return page_nr; in bm_word_to_page_idx()
307 unsigned int page_nr = bitnr >> (PAGE_SHIFT + 3); in bm_bit_to_page_idx() local
308 BUG_ON(page_nr >= b->bm_number_of_pages); in bm_bit_to_page_idx()
309 return page_nr; in bm_bit_to_page_idx()
990 static void bm_page_io_async(struct drbd_bm_aio_ctx *ctx, int page_nr) __must_hold(local) in bm_page_io_async() argument
1003 on_disk_sector = first_bm_sect + (((sector_t)page_nr) << (PAGE_SHIFT-SECTOR_SHIFT)); in bm_page_io_async()
1018 "page idx %u, sector %llu\n", page_nr, on_disk_sector); in bm_page_io_async()
1021 bm_set_page_io_err(b->bm_pages[page_nr]); in bm_page_io_async()
1031 bm_page_lock_io(device, page_nr); in bm_page_io_async()
1034 bm_set_page_unchanged(b->bm_pages[page_nr]); in bm_page_io_async()
1039 copy_highpage(page, b->bm_pages[page_nr]); in bm_page_io_async()
1040 bm_store_page_idx(page, page_nr); in bm_page_io_async()
1042 page = b->bm_pages[page_nr]; in bm_page_io_async()
1399 unsigned int page_nr = bm_bit_to_page_idx(b, bitnr); in __bm_change_bits_to() local
1400 if (page_nr != last_page_nr) { in __bm_change_bits_to()
1409 p_addr = __bm_map_pidx(b, page_nr); in __bm_change_bits_to()
1410 last_page_nr = page_nr; in __bm_change_bits_to()
1469 int page_nr, int first_word, int last_word) in bm_set_full_words_within_one_page() argument
1474 unsigned long *paddr = kmap_atomic(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1488 bm_set_page_lazy_writeout(b->bm_pages[page_nr]); in bm_set_full_words_within_one_page()
1513 int page_nr; in _drbd_bm_set_bits() local
1542 for (page_nr = first_page; page_nr < last_page; page_nr++) { in _drbd_bm_set_bits()
1543 bm_set_full_words_within_one_page(device->bitmap, page_nr, first_word, last_word); in _drbd_bm_set_bits()
1615 unsigned int page_nr = -1U; in drbd_bm_count_bits() local
1632 if (page_nr != idx) { in drbd_bm_count_bits()
1633 page_nr = idx; in drbd_bm_count_bits()
1639 c += (0 != test_bit_le(bitnr - (page_nr << (PAGE_SHIFT+3)), p_addr)); in drbd_bm_count_bits()