Lines Matching defs:page
59 * A bvec like structure to present a sector inside a page.
64 struct page *page;
161 * use the page uptodate bit in the stripe cache array
178 if (!rbio->bio_sectors[i].page) {
189 ASSERT(rbio->stripe_sectors[i].page);
190 memcpy_page(rbio->stripe_sectors[i].page,
192 rbio->bio_sectors[i].page,
237 * Update the stripe_sectors[] array to use correct page and pgoff
239 * Should be called every time any page pointer in stripes_pages[] got modified.
251 rbio->stripe_sectors[i].page = rbio->stripe_pages[page_index];
281 * we won't have a page which is half data half parity.
283 * Thus if the first sector of the page belongs to data stripes, then
284 * the full page belongs to data stripes.
304 struct page *p = src->stripe_pages[i];
868 * The read/modify/write code wants to reuse the original bio page as much
886 if (sector->page || bio_list_only) {
887 /* Don't return sector without a valid page pointer */
888 if (!sector->page)
924 rbio->stripe_pages = kcalloc(num_pages, sizeof(struct page *),
1056 ASSERT(sector->page);
1076 /* see if we can add this page onto our existing bio */
1087 ret = bio_add_page(last, sector->page, sectorsize,
1101 __bio_add_page(bio, sector->page, sectorsize, sector->pgoff);
1122 sector->page = bvec.bv_page;
1196 pointers[stripe] = kmap_local_page(sector->page) +
1203 pointers[stripe++] = kmap_local_page(sector->page) + sector->pgoff;
1212 pointers[stripe++] = kmap_local_page(sector->page) +
1367 * For subpage case, we can no longer set page Up-to-date directly for
1371 struct page *page,
1379 if (sector->page == page && sector->pgoff == pgoff)
1386 * this sets each page in the bio uptodate. It should only be used on private
1420 if (sector->page == bv->bv_page && sector->pgoff == bv->bv_offset)
1423 if (sector->page == bv->bv_page && sector->pgoff == bv->bv_offset)
1703 ASSERT(sector->page);
1708 ret = btrfs_check_sector_csum(fs_info, sector->page, sector->pgoff,
1766 ASSERT(sector->page);
1767 pointers[stripe_nr] = kmap_local_page(sector->page) +
2216 * We have a sector which doesn't have page nor uptodate,
2220 if (!sector->page || !sector->uptodate)
2383 struct page *page;
2391 page = alloc_page(GFP_NOFS);
2392 if (!page)
2394 rbio->stripe_pages[index] = page;
2441 p_sector.page = alloc_page(GFP_NOFS);
2442 if (!p_sector.page)
2449 q_sector.page = alloc_page(GFP_NOFS);
2450 if (!q_sector.page) {
2451 __free_page(p_sector.page);
2452 p_sector.page = NULL;
2457 pointers[rbio->real_stripes - 1] = kmap_local_page(q_sector.page);
2463 pointers[nr_data] = kmap_local_page(p_sector.page);
2469 /* first collect one page from each data stripe */
2472 pointers[stripe] = kmap_local_page(sector->page) +
2488 parity = kmap_local_page(sector->page) + sector->pgoff;
2501 __free_page(p_sector.page);
2502 p_sector.page = NULL;
2503 if (q_sector.page) {
2505 __free_page(q_sector.page);
2506 q_sector.page = NULL;
2743 * Unfortunately here we have to do page copy, other than reusing the pages.
2744 * This is due to the fact rbio has its own page management for its cache.
2747 struct page **data_pages, u64 data_logical)
2773 struct page *dst = rbio->stripe_pages[page_nr + page_index];
2774 struct page *src = data_pages[page_nr];