Lines Matching defs:imap
282 struct xfs_bmbt_irec *imap,
287 !isnullstartblock(imap->br_startblock)) {
293 return xfs_reflink_trim_around_shared(ip, imap, shared);
363 struct xfs_bmbt_irec *imap,
368 xfs_fileoff_t offset_fsb = imap->br_startoff;
369 xfs_filblks_t count_fsb = imap->br_blockcount;
381 xfs_trim_extent(imap, imap->br_startoff,
382 cmap->br_startoff - imap->br_startoff);
383 return xfs_bmap_trim_cow(ip, imap, shared);
388 xfs_trim_extent(imap, cmap->br_startoff, cmap->br_blockcount);
401 struct xfs_bmbt_irec *imap,
405 xfs_fileoff_t offset_fsb = imap->br_startoff;
406 xfs_filblks_t count_fsb = imap->br_blockcount;
410 * cmap might larger than imap due to cowextsize hint.
434 struct xfs_bmbt_irec *imap,
448 resaligned = xfs_aligned_fsb_count(imap->br_startoff,
449 imap->br_blockcount, xfs_get_cowextsz_hint(ip));
468 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared, &found);
479 error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount,
491 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
501 struct xfs_bmbt_irec *imap,
524 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared,
552 } while (cmap->br_startoff + cmap->br_blockcount <= imap->br_startoff);
554 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
565 struct xfs_bmbt_irec *imap,
580 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared, &found);
586 return xfs_reflink_convert_unwritten(ip, imap, cmap,
593 if (cmap->br_startoff > imap->br_startoff)
594 return xfs_reflink_fill_cow_hole(ip, imap, cmap, shared,
603 return xfs_reflink_fill_delalloc(ip, imap, cmap, shared,
1106 * - Read src's bmbt at the start of srange ("imap")
1107 * - If imap doesn't exist, make imap appear to start at the end of srange
1109 * - If imap starts before srange, advance imap to start at srange.
1110 * - If imap goes beyond srange, truncate imap to end at the end of srange.
1111 * - Punch (imap start - srange start + imap len) blocks from dest at
1113 * - If imap points to a real range of pblks,
1114 * > Increase the refcount of the imap's pblks
1115 * > Map imap's pblks into dest at the offset
1116 * (drange start + imap start - srange start)
1117 * - Advance drange and srange by (imap start - srange start + imap len)
1535 struct xfs_bmbt_irec imap;
1556 error = xfs_bmapi_read(src, srcoff, len, &imap, &nimaps, 0);
1567 ASSERT(nimaps == 1 && imap.br_startoff == srcoff);
1568 if (imap.br_startblock == DELAYSTARTBLOCK) {
1569 ASSERT(imap.br_startblock != DELAYSTARTBLOCK);
1575 trace_xfs_reflink_remap_extent_src(src, &imap);
1578 imap.br_startoff = destoff;
1579 error = xfs_reflink_remap_extent(dest, &imap, new_isize);
1589 srcoff += imap.br_blockcount;
1590 destoff += imap.br_blockcount;
1591 len -= imap.br_blockcount;
1592 remapped_len += imap.br_blockcount;