Lines Matching refs:ltrec
613 struct xfs_rmap_irec ltrec; in xfs_rmap_unmap() local
634 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, <rec, &i); in xfs_rmap_unmap()
643 trace_xfs_rmap_lookup_le_range_result(cur, ltrec.rm_startblock, in xfs_rmap_unmap()
644 ltrec.rm_blockcount, ltrec.rm_owner, ltrec.rm_offset, in xfs_rmap_unmap()
645 ltrec.rm_flags); in xfs_rmap_unmap()
646 ltoff = ltrec.rm_offset; in xfs_rmap_unmap()
658 ltrec.rm_startblock + ltrec.rm_blockcount)) { in xfs_rmap_unmap()
674 ltrec.rm_startblock + ltrec.rm_blockcount <= bno) { in xfs_rmap_unmap()
696 ltrec.rm_startblock > bno || in xfs_rmap_unmap()
697 ltrec.rm_startblock + ltrec.rm_blockcount < in xfs_rmap_unmap()
705 error = xfs_rmap_free_check_owner(cur, ltoff, <rec, len, owner, in xfs_rmap_unmap()
710 if (ltrec.rm_startblock == bno && ltrec.rm_blockcount == len) { in xfs_rmap_unmap()
712 trace_xfs_rmap_delete(cur, ltrec.rm_startblock, in xfs_rmap_unmap()
713 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap()
714 ltrec.rm_offset, ltrec.rm_flags); in xfs_rmap_unmap()
723 } else if (ltrec.rm_startblock == bno) { in xfs_rmap_unmap()
734 ltrec.rm_startblock += len; in xfs_rmap_unmap()
735 ltrec.rm_blockcount -= len; in xfs_rmap_unmap()
737 ltrec.rm_offset += len; in xfs_rmap_unmap()
738 error = xfs_rmap_update(cur, <rec); in xfs_rmap_unmap()
741 } else if (ltrec.rm_startblock + ltrec.rm_blockcount == bno + len) { in xfs_rmap_unmap()
752 ltrec.rm_blockcount -= len; in xfs_rmap_unmap()
753 error = xfs_rmap_update(cur, <rec); in xfs_rmap_unmap()
770 xfs_extlen_t orig_len = ltrec.rm_blockcount; in xfs_rmap_unmap()
772 ltrec.rm_blockcount = bno - ltrec.rm_startblock; in xfs_rmap_unmap()
773 error = xfs_rmap_update(cur, <rec); in xfs_rmap_unmap()
783 ltrec.rm_blockcount; in xfs_rmap_unmap()
784 cur->bc_rec.r.rm_owner = ltrec.rm_owner; in xfs_rmap_unmap()
957 struct xfs_rmap_irec ltrec; in xfs_rmap_map() local
982 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, <rec, in xfs_rmap_map()
987 trace_xfs_rmap_lookup_le_range_result(cur, ltrec.rm_startblock, in xfs_rmap_map()
988 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_map()
989 ltrec.rm_offset, ltrec.rm_flags); in xfs_rmap_map()
991 if (!xfs_rmap_is_mergeable(<rec, owner, flags)) in xfs_rmap_map()
997 ltrec.rm_startblock + ltrec.rm_blockcount > bno)) { in xfs_rmap_map()
1038 ltrec.rm_startblock + ltrec.rm_blockcount == bno && in xfs_rmap_map()
1039 (ignore_off || ltrec.rm_offset + ltrec.rm_blockcount == offset)) { in xfs_rmap_map()
1049 ltrec.rm_blockcount += len; in xfs_rmap_map()
1053 (unsigned long)ltrec.rm_blockcount + len + in xfs_rmap_map()
1064 ltrec.rm_blockcount += gtrec.rm_blockcount; in xfs_rmap_map()
1082 error = xfs_rmap_update(cur, <rec); in xfs_rmap_map()
2114 struct xfs_rmap_irec ltrec; in xfs_rmap_unmap_shared() local
2133 <rec, &i); in xfs_rmap_unmap_shared()
2141 ltoff = ltrec.rm_offset; in xfs_rmap_unmap_shared()
2145 ltrec.rm_startblock > bno || in xfs_rmap_unmap_shared()
2146 ltrec.rm_startblock + ltrec.rm_blockcount < in xfs_rmap_unmap_shared()
2154 if (XFS_IS_CORRUPT(mp, owner != ltrec.rm_owner)) { in xfs_rmap_unmap_shared()
2163 (ltrec.rm_flags & XFS_RMAP_UNWRITTEN))) { in xfs_rmap_unmap_shared()
2170 if (XFS_IS_CORRUPT(mp, ltrec.rm_offset > offset)) { in xfs_rmap_unmap_shared()
2175 if (XFS_IS_CORRUPT(mp, offset > ltoff + ltrec.rm_blockcount)) { in xfs_rmap_unmap_shared()
2181 if (ltrec.rm_startblock == bno && ltrec.rm_blockcount == len) { in xfs_rmap_unmap_shared()
2183 error = xfs_rmap_delete(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2184 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap_shared()
2185 ltrec.rm_offset, ltrec.rm_flags); in xfs_rmap_unmap_shared()
2188 } else if (ltrec.rm_startblock == bno) { in xfs_rmap_unmap_shared()
2201 error = xfs_rmap_delete(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2202 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap_shared()
2203 ltrec.rm_offset, ltrec.rm_flags); in xfs_rmap_unmap_shared()
2208 ltrec.rm_startblock += len; in xfs_rmap_unmap_shared()
2209 ltrec.rm_blockcount -= len; in xfs_rmap_unmap_shared()
2210 ltrec.rm_offset += len; in xfs_rmap_unmap_shared()
2211 error = xfs_rmap_insert(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2212 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap_shared()
2213 ltrec.rm_offset, ltrec.rm_flags); in xfs_rmap_unmap_shared()
2216 } else if (ltrec.rm_startblock + ltrec.rm_blockcount == bno + len) { in xfs_rmap_unmap_shared()
2227 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2228 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap_shared()
2229 ltrec.rm_offset, ltrec.rm_flags, &i); in xfs_rmap_unmap_shared()
2237 ltrec.rm_blockcount -= len; in xfs_rmap_unmap_shared()
2238 error = xfs_rmap_update(cur, <rec); in xfs_rmap_unmap_shared()
2254 xfs_extlen_t orig_len = ltrec.rm_blockcount; in xfs_rmap_unmap_shared()
2257 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2258 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_unmap_shared()
2259 ltrec.rm_offset, ltrec.rm_flags, &i); in xfs_rmap_unmap_shared()
2267 ltrec.rm_blockcount = bno - ltrec.rm_startblock; in xfs_rmap_unmap_shared()
2268 error = xfs_rmap_update(cur, <rec); in xfs_rmap_unmap_shared()
2274 orig_len - len - ltrec.rm_blockcount, in xfs_rmap_unmap_shared()
2275 ltrec.rm_owner, offset + len, in xfs_rmap_unmap_shared()
2276 ltrec.rm_flags); in xfs_rmap_unmap_shared()
2306 struct xfs_rmap_irec ltrec; in xfs_rmap_map_shared() local
2323 <rec, &have_lt); in xfs_rmap_map_shared()
2327 !xfs_rmap_is_mergeable(<rec, owner, flags)) in xfs_rmap_map_shared()
2354 ltrec.rm_startblock + ltrec.rm_blockcount == bno && in xfs_rmap_map_shared()
2355 ltrec.rm_offset + ltrec.rm_blockcount == offset) { in xfs_rmap_map_shared()
2365 ltrec.rm_blockcount += len; in xfs_rmap_map_shared()
2378 ltrec.rm_blockcount += gtrec.rm_blockcount; in xfs_rmap_map_shared()
2387 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_map_shared()
2388 ltrec.rm_blockcount, ltrec.rm_owner, in xfs_rmap_map_shared()
2389 ltrec.rm_offset, ltrec.rm_flags, &i); in xfs_rmap_map_shared()
2398 error = xfs_rmap_update(cur, <rec); in xfs_rmap_map_shared()