Lines Matching defs:imap

230 	struct xfs_bmbt_irec	*imap,
235 !isnullstartblock(imap->br_startblock)) {
241 return xfs_reflink_trim_around_shared(ip, imap, shared);
311 struct xfs_bmbt_irec *imap,
316 xfs_fileoff_t offset_fsb = imap->br_startoff;
317 xfs_filblks_t count_fsb = imap->br_blockcount;
329 xfs_trim_extent(imap, imap->br_startoff,
330 cmap->br_startoff - imap->br_startoff);
331 return xfs_bmap_trim_cow(ip, imap, shared);
336 xfs_trim_extent(imap, cmap->br_startoff, cmap->br_blockcount);
349 struct xfs_bmbt_irec *imap,
353 xfs_fileoff_t offset_fsb = imap->br_startoff;
354 xfs_filblks_t count_fsb = imap->br_blockcount;
358 * cmap might larger than imap due to cowextsize hint.
382 struct xfs_bmbt_irec *imap,
396 resaligned = xfs_aligned_fsb_count(imap->br_startoff,
397 imap->br_blockcount, xfs_get_cowextsz_hint(ip));
410 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared, &found);
421 error = xfs_bmapi_write(tp, ip, imap->br_startoff, imap->br_blockcount,
440 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
450 struct xfs_bmbt_irec *imap,
473 error = xfs_find_trim_cow_extent(ip, imap, cmap, shared,
508 } while (cmap->br_startoff + cmap->br_blockcount <= imap->br_startoff);
510 return xfs_reflink_convert_unwritten(ip, imap, cmap, convert_now);
521 struct xfs_bmbt_irec *imap,
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,
559 return xfs_reflink_fill_delalloc(ip, imap, cmap, shared,
953 * - Read src's bmbt at the start of srange ("imap")
954 * - If imap doesn't exist, make imap appear to start at the end of srange
956 * - If imap starts before srange, advance imap to start at srange.
957 * - If imap goes beyond srange, truncate imap to end at the end of srange.
958 * - Punch (imap start - srange start + imap len) blocks from dest at
960 * - If imap points to a real range of pblks,
961 * > Increase the refcount of the imap's pblks
962 * > Map imap's pblks into dest at the offset
963 * (drange start + imap start - srange start)
964 * - Advance drange and srange by (imap start - srange start + imap len)
1359 struct xfs_bmbt_irec imap;
1380 error = xfs_bmapi_read(src, srcoff, len, &imap, &nimaps, 0);
1391 ASSERT(nimaps == 1 && imap.br_startoff == srcoff);
1392 if (imap.br_startblock == DELAYSTARTBLOCK) {
1393 ASSERT(imap.br_startblock != DELAYSTARTBLOCK);
1398 trace_xfs_reflink_remap_extent_src(src, &imap);
1401 imap.br_startoff = destoff;
1402 error = xfs_reflink_remap_extent(dest, &imap, new_isize);
1412 srcoff += imap.br_blockcount;
1413 destoff += imap.br_blockcount;
1414 len -= imap.br_blockcount;
1415 remapped_len += imap.br_blockcount;