Lines Matching refs:iomap
1008 static sector_t dax_iomap_sector(const struct iomap *iomap, loff_t pos) in dax_iomap_sector() argument
1010 return (iomap->addr + (pos & PAGE_MASK) - iomap->offset) >> 9; in dax_iomap_sector()
1013 static int dax_iomap_pfn(const struct iomap *iomap, loff_t pos, size_t size, in dax_iomap_pfn() argument
1016 const sector_t sector = dax_iomap_sector(iomap, pos); in dax_iomap_pfn()
1021 rc = bdev_dax_pgoff(iomap->bdev, sector, size, &pgoff); in dax_iomap_pfn()
1025 length = dax_direct_access(iomap->dax_dev, pgoff, PHYS_PFN(size), in dax_iomap_pfn()
1071 const struct iomap *iomap, void **entry) in dax_pmd_load_hole() argument
1123 const struct iomap *iomap, void **entry) in dax_pmd_load_hole() argument
1129 s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap) in dax_iomap_zero() argument
1131 sector_t sector = iomap_sector(iomap, pos & PAGE_MASK); in dax_iomap_zero()
1143 rc = bdev_dax_pgoff(iomap->bdev, sector, PAGE_SIZE, &pgoff); in dax_iomap_zero()
1150 rc = dax_zero_page_range(iomap->dax_dev, pgoff, 1); in dax_iomap_zero()
1152 rc = dax_direct_access(iomap->dax_dev, pgoff, 1, &kaddr, NULL); in dax_iomap_zero()
1160 dax_flush(iomap->dax_dev, kaddr + offset, size); in dax_iomap_zero()
1169 const struct iomap *iomap = &iomi->iomap; in dax_iomap_iter() local
1172 struct block_device *bdev = iomap->bdev; in dax_iomap_iter()
1173 struct dax_device *dax_dev = iomap->dax_dev; in dax_iomap_iter()
1184 if (iomap->type == IOMAP_HOLE || iomap->type == IOMAP_UNWRITTEN) in dax_iomap_iter()
1188 if (WARN_ON_ONCE(iomap->type != IOMAP_MAPPED)) in dax_iomap_iter()
1196 if (iomap->flags & IOMAP_F_NEW) { in dax_iomap_iter()
1206 const sector_t sector = dax_iomap_sector(iomap, pos); in dax_iomap_iter()
1312 struct vm_area_struct *vma, const struct iomap *iomap) in dax_fault_is_synchronous() argument
1315 && (iomap->flags & IOMAP_F_DIRTY); in dax_fault_is_synchronous()
1335 sector_t sector = dax_iomap_sector(&iter->iomap, iter->pos); in dax_fault_cow_page()
1340 switch (iter->iomap.type) { in dax_fault_cow_page()
1346 error = copy_cow_page_dax(iter->iomap.bdev, iter->iomap.dax_dev, in dax_fault_cow_page()
1379 const struct iomap *iomap = &iter->iomap; in dax_fault_iter() local
1383 bool sync = dax_fault_is_synchronous(iter->flags, vmf->vma, iomap); in dax_fault_iter()
1393 (iomap->type == IOMAP_UNWRITTEN || iomap->type == IOMAP_HOLE)) { in dax_fault_iter()
1396 return dax_pmd_load_hole(xas, vmf, iomap, entry); in dax_fault_iter()
1399 if (iomap->type != IOMAP_MAPPED) { in dax_fault_iter()
1404 err = dax_iomap_pfn(&iter->iomap, pos, size, &pfn); in dax_fault_iter()
1478 (iter.iomap.flags & IOMAP_F_NEW)) { in dax_iomap_pte_fault()