Lines Matching refs:cmap
312 struct xfs_bmbt_irec *cmap,
326 if (!xfs_iext_lookup_extent(ip, ip->i_cowfp, offset_fsb, &icur, cmap))
327 cmap->br_startoff = offset_fsb + count_fsb;
328 if (cmap->br_startoff > offset_fsb) {
330 cmap->br_startoff - imap->br_startoff);
335 if (isnullstartblock(cmap->br_startblock)) {
336 xfs_trim_extent(imap, cmap->br_startoff, cmap->br_blockcount);
341 xfs_trim_extent(cmap, offset_fsb, count_fsb);
350 struct xfs_bmbt_irec *cmap,
358 * cmap might larger than imap due to cowextsize hint.
360 xfs_trim_extent(cmap, offset_fsb, count_fsb);
367 if (!convert_now || cmap->br_state == XFS_EXT_NORM)
370 trace_xfs_reflink_convert_cow(ip, cmap);
374 cmap->br_state = XFS_EXT_NORM;
383 struct xfs_bmbt_irec *cmap,
410 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared, &found);
422 XFS_BMAPI_COWFORK | XFS_BMAPI_PREALLOC, 0, cmap,
440 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
451 struct xfs_bmbt_irec *cmap,
473 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared,
483 ASSERT(isnullstartblock(cmap->br_startblock) ||
484 cmap->br_startblock == DELAYSTARTBLOCK);
490 error = xfs_bmapi_write(tp, ip, cmap->br_startoff,
491 cmap->br_blockcount,
493 cmap, &nimaps);
508 } while (cmap->br_startoff + cmap->br_blockcount <= imap->br_startoff);
510 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
522 struct xfs_bmbt_irec *cmap,
536 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared, &found);
542 return xfs_reflink_convert_unwritten(ip, imap, cmap,
549 if (cmap->br_startoff > imap->br_startoff)
550 return xfs_reflink_fill_cow_hole(ip, imap, cmap, shared,
557 if (isnullstartblock(cmap->br_startblock) ||
558 cmap->br_startblock == DELAYSTARTBLOCK)
559 return xfs_reflink_fill_delalloc(ip, imap, cmap, shared,