Lines Matching full:error

48 	int			error;  in xfs_rmap_lookup_le()  local
56 error = xfs_btree_lookup(cur, XFS_LOOKUP_LE, stat); in xfs_rmap_lookup_le()
57 if (error || !(*stat) || !irec) in xfs_rmap_lookup_le()
58 return error; in xfs_rmap_lookup_le()
60 error = xfs_rmap_get_rec(cur, irec, &get_stat); in xfs_rmap_lookup_le()
61 if (error) in xfs_rmap_lookup_le()
62 return error; in xfs_rmap_lookup_le()
96 * This either works (return 0) or gets an EFSCORRUPTED error.
104 int error; in xfs_rmap_update() local
114 error = xfs_btree_update(cur, &rec); in xfs_rmap_update()
115 if (error) in xfs_rmap_update()
116 trace_xfs_rmap_update_error(cur, error, _RET_IP_); in xfs_rmap_update()
117 return error; in xfs_rmap_update()
130 int error; in xfs_rmap_insert() local
134 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_insert()
135 if (error) in xfs_rmap_insert()
139 error = -EFSCORRUPTED; in xfs_rmap_insert()
148 error = xfs_btree_insert(rcur, &i); in xfs_rmap_insert()
149 if (error) in xfs_rmap_insert()
153 error = -EFSCORRUPTED; in xfs_rmap_insert()
157 if (error) in xfs_rmap_insert()
158 trace_xfs_rmap_insert_error(rcur, error, _RET_IP_); in xfs_rmap_insert()
159 return error; in xfs_rmap_insert()
172 int error; in xfs_rmap_delete() local
176 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_delete()
177 if (error) in xfs_rmap_delete()
181 error = -EFSCORRUPTED; in xfs_rmap_delete()
185 error = xfs_btree_delete(rcur, &i); in xfs_rmap_delete()
186 if (error) in xfs_rmap_delete()
190 error = -EFSCORRUPTED; in xfs_rmap_delete()
194 if (error) in xfs_rmap_delete()
195 trace_xfs_rmap_delete_error(rcur, error, _RET_IP_); in xfs_rmap_delete()
196 return error; in xfs_rmap_delete()
381 int error; in xfs_rmap_get_rec() local
383 error = xfs_btree_get_rec(cur, &rec, stat); in xfs_rmap_get_rec()
384 if (error || !*stat) in xfs_rmap_get_rec()
385 return error; in xfs_rmap_get_rec()
442 int error; in xfs_rmap_find_left_neighbor() local
479 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, irec, in xfs_rmap_find_left_neighbor()
481 if (error) in xfs_rmap_find_left_neighbor()
482 return error; in xfs_rmap_find_left_neighbor()
484 error = xfs_rmap_find_left_neighbor_helper(cur, irec, &info); in xfs_rmap_find_left_neighbor()
485 if (!error) in xfs_rmap_find_left_neighbor()
486 error = xfs_rmap_query_range(cur, &info.high, &info.high, in xfs_rmap_find_left_neighbor()
488 if (error != -ECANCELED) in xfs_rmap_find_left_neighbor()
489 return error; in xfs_rmap_find_left_neighbor()
541 int error; in xfs_rmap_lookup_le_range() local
572 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, irec, in xfs_rmap_lookup_le_range()
574 if (error) in xfs_rmap_lookup_le_range()
575 return error; in xfs_rmap_lookup_le_range()
577 error = xfs_rmap_lookup_le_range_helper(cur, irec, &info); in xfs_rmap_lookup_le_range()
578 if (!error) in xfs_rmap_lookup_le_range()
579 error = xfs_rmap_query_range(cur, &info.high, &info.high, in xfs_rmap_lookup_le_range()
581 if (error != -ECANCELED) in xfs_rmap_lookup_le_range()
582 return error; in xfs_rmap_lookup_le_range()
606 int error = 0; in xfs_rmap_free_check_owner() local
616 error = -EFSCORRUPTED; in xfs_rmap_free_check_owner()
623 error = -EFSCORRUPTED; in xfs_rmap_free_check_owner()
635 error = -EFSCORRUPTED; in xfs_rmap_free_check_owner()
641 error = -EFSCORRUPTED; in xfs_rmap_free_check_owner()
647 error = -EFSCORRUPTED; in xfs_rmap_free_check_owner()
653 return error; in xfs_rmap_free_check_owner()
685 int error = 0; in xfs_rmap_unmap() local
704 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, &ltrec, &i); in xfs_rmap_unmap()
705 if (error) in xfs_rmap_unmap()
709 error = -EFSCORRUPTED; in xfs_rmap_unmap()
730 error = -EFSCORRUPTED; in xfs_rmap_unmap()
747 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_unmap()
748 if (error) in xfs_rmap_unmap()
752 error = xfs_rmap_get_rec(cur, &rtrec, &i); in xfs_rmap_unmap()
753 if (error) in xfs_rmap_unmap()
757 error = -EFSCORRUPTED; in xfs_rmap_unmap()
770 error = -EFSCORRUPTED; in xfs_rmap_unmap()
775 error = xfs_rmap_free_check_owner(cur, ltoff, &ltrec, len, owner, in xfs_rmap_unmap()
777 if (error) in xfs_rmap_unmap()
785 error = xfs_btree_delete(cur, &i); in xfs_rmap_unmap()
786 if (error) in xfs_rmap_unmap()
790 error = -EFSCORRUPTED; in xfs_rmap_unmap()
808 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_unmap()
809 if (error) in xfs_rmap_unmap()
823 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_unmap()
824 if (error) in xfs_rmap_unmap()
843 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_unmap()
844 if (error) in xfs_rmap_unmap()
847 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_unmap()
848 if (error) in xfs_rmap_unmap()
865 error = xfs_btree_insert(cur, &i); in xfs_rmap_unmap()
866 if (error) in xfs_rmap_unmap()
873 if (error) in xfs_rmap_unmap()
874 trace_xfs_rmap_unmap_error(cur, error, _RET_IP_); in xfs_rmap_unmap()
875 return error; in xfs_rmap_unmap()
972 int error; in xfs_rmap_free() local
980 error = xfs_rmap_unmap(cur, bno, len, false, oinfo); in xfs_rmap_free()
982 xfs_btree_del_cursor(cur, error); in xfs_rmap_free()
983 return error; in xfs_rmap_free()
1032 int error = 0; in xfs_rmap_map() local
1053 error = xfs_rmap_lookup_le(cur, bno, owner, offset, flags, &ltrec, in xfs_rmap_map()
1055 if (error) in xfs_rmap_map()
1070 error = -EFSCORRUPTED; in xfs_rmap_map()
1079 error = xfs_btree_increment(cur, 0, &have_gt); in xfs_rmap_map()
1080 if (error) in xfs_rmap_map()
1083 error = xfs_rmap_get_rec(cur, &gtrec, &have_gt); in xfs_rmap_map()
1084 if (error) in xfs_rmap_map()
1088 error = -EFSCORRUPTED; in xfs_rmap_map()
1093 error = -EFSCORRUPTED; in xfs_rmap_map()
1139 error = xfs_btree_delete(cur, &i); in xfs_rmap_map()
1140 if (error) in xfs_rmap_map()
1144 error = -EFSCORRUPTED; in xfs_rmap_map()
1150 error = xfs_btree_decrement(cur, 0, &have_gt); in xfs_rmap_map()
1151 if (error) in xfs_rmap_map()
1153 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_map()
1154 if (error) in xfs_rmap_map()
1172 error = xfs_rmap_update(cur, &gtrec); in xfs_rmap_map()
1173 if (error) in xfs_rmap_map()
1186 error = xfs_btree_insert(cur, &i); in xfs_rmap_map()
1187 if (error) in xfs_rmap_map()
1191 error = -EFSCORRUPTED; in xfs_rmap_map()
1198 if (error) in xfs_rmap_map()
1199 trace_xfs_rmap_map_error(cur, error, _RET_IP_); in xfs_rmap_map()
1200 return error; in xfs_rmap_map()
1217 int error; in xfs_rmap_alloc() local
1225 error = xfs_rmap_map(cur, bno, len, false, oinfo); in xfs_rmap_alloc()
1227 xfs_btree_del_cursor(cur, error); in xfs_rmap_alloc()
1228 return error; in xfs_rmap_alloc()
1267 int error; in xfs_rmap_convert() local
1281 error = xfs_rmap_lookup_le(cur, bno, owner, offset, oldext, &PREV, &i); in xfs_rmap_convert()
1282 if (error) in xfs_rmap_convert()
1286 error = -EFSCORRUPTED; in xfs_rmap_convert()
1313 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1314 if (error) in xfs_rmap_convert()
1318 error = xfs_rmap_get_rec(cur, &LEFT, &i); in xfs_rmap_convert()
1319 if (error) in xfs_rmap_convert()
1323 error = -EFSCORRUPTED; in xfs_rmap_convert()
1330 error = -EFSCORRUPTED; in xfs_rmap_convert()
1347 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_convert()
1348 if (error) in xfs_rmap_convert()
1352 error = -EFSCORRUPTED; in xfs_rmap_convert()
1355 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_convert()
1356 if (error) in xfs_rmap_convert()
1360 error = xfs_rmap_get_rec(cur, &RIGHT, &i); in xfs_rmap_convert()
1361 if (error) in xfs_rmap_convert()
1365 error = -EFSCORRUPTED; in xfs_rmap_convert()
1370 error = -EFSCORRUPTED; in xfs_rmap_convert()
1395 error = xfs_rmap_lookup_le(cur, bno, owner, offset, oldext, NULL, &i); in xfs_rmap_convert()
1396 if (error) in xfs_rmap_convert()
1400 error = -EFSCORRUPTED; in xfs_rmap_convert()
1415 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_convert()
1416 if (error) in xfs_rmap_convert()
1420 error = -EFSCORRUPTED; in xfs_rmap_convert()
1426 error = xfs_btree_delete(cur, &i); in xfs_rmap_convert()
1427 if (error) in xfs_rmap_convert()
1431 error = -EFSCORRUPTED; in xfs_rmap_convert()
1434 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1435 if (error) in xfs_rmap_convert()
1439 error = -EFSCORRUPTED; in xfs_rmap_convert()
1445 error = xfs_btree_delete(cur, &i); in xfs_rmap_convert()
1446 if (error) in xfs_rmap_convert()
1450 error = -EFSCORRUPTED; in xfs_rmap_convert()
1453 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1454 if (error) in xfs_rmap_convert()
1458 error = -EFSCORRUPTED; in xfs_rmap_convert()
1463 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1464 if (error) in xfs_rmap_convert()
1476 error = xfs_btree_delete(cur, &i); in xfs_rmap_convert()
1477 if (error) in xfs_rmap_convert()
1481 error = -EFSCORRUPTED; in xfs_rmap_convert()
1484 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1485 if (error) in xfs_rmap_convert()
1489 error = -EFSCORRUPTED; in xfs_rmap_convert()
1494 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1495 if (error) in xfs_rmap_convert()
1504 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_convert()
1505 if (error) in xfs_rmap_convert()
1509 error = -EFSCORRUPTED; in xfs_rmap_convert()
1515 error = xfs_btree_delete(cur, &i); in xfs_rmap_convert()
1516 if (error) in xfs_rmap_convert()
1520 error = -EFSCORRUPTED; in xfs_rmap_convert()
1523 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1524 if (error) in xfs_rmap_convert()
1528 error = -EFSCORRUPTED; in xfs_rmap_convert()
1534 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1535 if (error) in xfs_rmap_convert()
1547 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1548 if (error) in xfs_rmap_convert()
1561 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1562 if (error) in xfs_rmap_convert()
1564 error = xfs_btree_decrement(cur, 0, &i); in xfs_rmap_convert()
1565 if (error) in xfs_rmap_convert()
1569 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1570 if (error) in xfs_rmap_convert()
1583 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1584 if (error) in xfs_rmap_convert()
1593 error = xfs_btree_insert(cur, &i); in xfs_rmap_convert()
1594 if (error) in xfs_rmap_convert()
1598 error = -EFSCORRUPTED; in xfs_rmap_convert()
1610 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1611 if (error) in xfs_rmap_convert()
1613 error = xfs_btree_increment(cur, 0, &i); in xfs_rmap_convert()
1614 if (error) in xfs_rmap_convert()
1620 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1621 if (error) in xfs_rmap_convert()
1632 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1633 if (error) in xfs_rmap_convert()
1635 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset, in xfs_rmap_convert()
1637 if (error) in xfs_rmap_convert()
1641 error = -EFSCORRUPTED; in xfs_rmap_convert()
1651 error = xfs_btree_insert(cur, &i); in xfs_rmap_convert()
1652 if (error) in xfs_rmap_convert()
1656 error = -EFSCORRUPTED; in xfs_rmap_convert()
1674 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert()
1675 if (error) in xfs_rmap_convert()
1684 error = xfs_btree_insert(cur, &i); in xfs_rmap_convert()
1685 if (error) in xfs_rmap_convert()
1689 error = -EFSCORRUPTED; in xfs_rmap_convert()
1697 error = xfs_rmap_lookup_eq(cur, bno, len, owner, offset, in xfs_rmap_convert()
1699 if (error) in xfs_rmap_convert()
1703 error = -EFSCORRUPTED; in xfs_rmap_convert()
1710 error = xfs_btree_insert(cur, &i); in xfs_rmap_convert()
1711 if (error) in xfs_rmap_convert()
1715 error = -EFSCORRUPTED; in xfs_rmap_convert()
1735 if (error) in xfs_rmap_convert()
1736 trace_xfs_rmap_convert_error(cur, error, _RET_IP_); in xfs_rmap_convert()
1737 return error; in xfs_rmap_convert()
1765 int error; in xfs_rmap_convert_shared() local
1779 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext, in xfs_rmap_convert_shared()
1781 if (error) in xfs_rmap_convert_shared()
1785 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1804 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, newext, in xfs_rmap_convert_shared()
1806 if (error) in xfs_rmap_convert_shared()
1814 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1822 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len, in xfs_rmap_convert_shared()
1824 if (error) in xfs_rmap_convert_shared()
1828 error = xfs_rmap_get_rec(cur, &RIGHT, &i); in xfs_rmap_convert_shared()
1829 if (error) in xfs_rmap_convert_shared()
1833 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1838 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1870 error = xfs_rmap_delete(cur, RIGHT.rm_startblock, in xfs_rmap_convert_shared()
1873 if (error) in xfs_rmap_convert_shared()
1875 error = xfs_rmap_delete(cur, PREV.rm_startblock, in xfs_rmap_convert_shared()
1878 if (error) in xfs_rmap_convert_shared()
1881 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1884 if (error) in xfs_rmap_convert_shared()
1888 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1892 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
1893 if (error) in xfs_rmap_convert_shared()
1902 error = xfs_rmap_delete(cur, PREV.rm_startblock, in xfs_rmap_convert_shared()
1905 if (error) in xfs_rmap_convert_shared()
1908 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1911 if (error) in xfs_rmap_convert_shared()
1915 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1919 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
1920 if (error) in xfs_rmap_convert_shared()
1929 error = xfs_rmap_delete(cur, RIGHT.rm_startblock, in xfs_rmap_convert_shared()
1932 if (error) in xfs_rmap_convert_shared()
1935 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1938 if (error) in xfs_rmap_convert_shared()
1942 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1947 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
1948 if (error) in xfs_rmap_convert_shared()
1959 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1962 if (error) in xfs_rmap_convert_shared()
1966 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
1970 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
1971 if (error) in xfs_rmap_convert_shared()
1981 error = xfs_rmap_delete(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1984 if (error) in xfs_rmap_convert_shared()
1989 error = xfs_rmap_insert(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1992 if (error) in xfs_rmap_convert_shared()
1995 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
1998 if (error) in xfs_rmap_convert_shared()
2002 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
2006 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
2007 if (error) in xfs_rmap_convert_shared()
2017 error = xfs_rmap_delete(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2020 if (error) in xfs_rmap_convert_shared()
2025 error = xfs_rmap_insert(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2028 if (error) in xfs_rmap_convert_shared()
2030 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext); in xfs_rmap_convert_shared()
2031 if (error) in xfs_rmap_convert_shared()
2041 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2044 if (error) in xfs_rmap_convert_shared()
2048 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
2052 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
2053 if (error) in xfs_rmap_convert_shared()
2056 error = xfs_rmap_delete(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2059 if (error) in xfs_rmap_convert_shared()
2064 error = xfs_rmap_insert(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2067 if (error) in xfs_rmap_convert_shared()
2077 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2080 if (error) in xfs_rmap_convert_shared()
2084 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
2088 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
2089 if (error) in xfs_rmap_convert_shared()
2091 error = xfs_rmap_insert(cur, bno, len, owner, offset, newext); in xfs_rmap_convert_shared()
2092 if (error) in xfs_rmap_convert_shared()
2109 error = xfs_rmap_insert(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2112 if (error) in xfs_rmap_convert_shared()
2116 error = xfs_rmap_lookup_eq(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2119 if (error) in xfs_rmap_convert_shared()
2123 error = -EFSCORRUPTED; in xfs_rmap_convert_shared()
2127 error = xfs_rmap_update(cur, &NEW); in xfs_rmap_convert_shared()
2128 if (error) in xfs_rmap_convert_shared()
2136 error = xfs_rmap_insert(cur, NEW.rm_startblock, in xfs_rmap_convert_shared()
2139 if (error) in xfs_rmap_convert_shared()
2158 if (error) in xfs_rmap_convert_shared()
2159 trace_xfs_rmap_convert_error(cur, error, _RET_IP_); in xfs_rmap_convert_shared()
2160 return error; in xfs_rmap_convert_shared()
2188 int error = 0; in xfs_rmap_unmap_shared() local
2204 error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags, in xfs_rmap_unmap_shared()
2206 if (error) in xfs_rmap_unmap_shared()
2210 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2221 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2228 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2237 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2244 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2249 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2255 error = xfs_rmap_delete(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2258 if (error) in xfs_rmap_unmap_shared()
2273 error = xfs_rmap_delete(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2276 if (error) in xfs_rmap_unmap_shared()
2283 error = xfs_rmap_insert(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2286 if (error) in xfs_rmap_unmap_shared()
2299 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2302 if (error) in xfs_rmap_unmap_shared()
2306 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2310 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_unmap_shared()
2311 if (error) in xfs_rmap_unmap_shared()
2329 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_unmap_shared()
2332 if (error) in xfs_rmap_unmap_shared()
2336 error = -EFSCORRUPTED; in xfs_rmap_unmap_shared()
2340 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_unmap_shared()
2341 if (error) in xfs_rmap_unmap_shared()
2345 error = xfs_rmap_insert(cur, bno + len, in xfs_rmap_unmap_shared()
2349 if (error) in xfs_rmap_unmap_shared()
2355 if (error) in xfs_rmap_unmap_shared()
2356 trace_xfs_rmap_unmap_error(cur, error, _RET_IP_); in xfs_rmap_unmap_shared()
2357 return error; in xfs_rmap_unmap_shared()
2382 int error = 0; in xfs_rmap_map_shared() local
2394 error = xfs_rmap_find_left_neighbor(cur, bno, owner, offset, flags, in xfs_rmap_map_shared()
2396 if (error) in xfs_rmap_map_shared()
2403 error = xfs_rmap_lookup_eq(cur, bno + len, len, owner, offset + len, in xfs_rmap_map_shared()
2405 if (error) in xfs_rmap_map_shared()
2408 error = xfs_rmap_get_rec(cur, &gtrec, &have_gt); in xfs_rmap_map_shared()
2409 if (error) in xfs_rmap_map_shared()
2413 error = -EFSCORRUPTED; in xfs_rmap_map_shared()
2451 error = xfs_rmap_delete(cur, gtrec.rm_startblock, in xfs_rmap_map_shared()
2454 if (error) in xfs_rmap_map_shared()
2459 error = xfs_rmap_lookup_eq(cur, ltrec.rm_startblock, in xfs_rmap_map_shared()
2462 if (error) in xfs_rmap_map_shared()
2466 error = -EFSCORRUPTED; in xfs_rmap_map_shared()
2470 error = xfs_rmap_update(cur, &ltrec); in xfs_rmap_map_shared()
2471 if (error) in xfs_rmap_map_shared()
2486 error = xfs_rmap_delete(cur, gtrec.rm_startblock, in xfs_rmap_map_shared()
2489 if (error) in xfs_rmap_map_shared()
2496 error = xfs_rmap_insert(cur, gtrec.rm_startblock, in xfs_rmap_map_shared()
2499 if (error) in xfs_rmap_map_shared()
2506 error = xfs_rmap_insert(cur, bno, len, owner, offset, flags); in xfs_rmap_map_shared()
2507 if (error) in xfs_rmap_map_shared()
2513 if (error) in xfs_rmap_map_shared()
2514 trace_xfs_rmap_map_error(cur, error, _RET_IP_); in xfs_rmap_map_shared()
2515 return error; in xfs_rmap_map_shared()
2639 int error; in xfs_rmap_finish_init_cursor() local
2645 error = xfs_free_extent_fix_freelist(tp, pag, &agbp); in xfs_rmap_finish_init_cursor()
2646 if (error) { in xfs_rmap_finish_init_cursor()
2648 return error; in xfs_rmap_finish_init_cursor()
2689 int error = 0; in xfs_rmap_finish_one() local
2706 error = xfs_rtrmap_finish_init_cursor(tp, ri, pcur); in xfs_rmap_finish_one()
2708 error = xfs_rmap_finish_init_cursor(tp, ri, pcur); in xfs_rmap_finish_one()
2709 if (error) in xfs_rmap_finish_one()
2710 return error; in xfs_rmap_finish_one()
2719 error = __xfs_rmap_finish_intent(*pcur, ri->ri_type, bno, in xfs_rmap_finish_one()
2721 if (error) in xfs_rmap_finish_one()
2722 return error; in xfs_rmap_finish_one()
3049 int error; in xfs_rmap_count_owners() local
3052 error = xfs_rmap_query_range(cur, &roc.low, &roc.high, in xfs_rmap_count_owners()
3054 if (error) in xfs_rmap_count_owners()
3055 return error; in xfs_rmap_count_owners()
3081 int error; in xfs_rmap_has_other_keys() local
3086 error = xfs_rmap_query_range(cur, &roc.low, &roc.high, in xfs_rmap_has_other_keys()
3088 if (error == -ECANCELED) { in xfs_rmap_has_other_keys()
3092 if (error) in xfs_rmap_has_other_keys()
3093 return error; in xfs_rmap_has_other_keys()