Lines Matching defs:error
97 STATIC int /* error */
107 STATIC int /* error */
144 * This either works (return 0) or gets an EFSCORRUPTED error.
325 int error; /* error return value */
366 error = xfs_btree_read_bufl(mp, NULL, bno, &bp,
369 if (error)
385 error = -EFSCORRUPTED;
452 error = xfs_btree_read_bufl(mp, NULL, bno, &bp,
455 if (error)
582 STATIC int /* error */
596 int error; /* error return value */
618 error = xfs_btree_read_bufl(mp, tp, cbno, &cbp, XFS_BMAP_BTREE_REF,
620 if (error)
621 return error;
623 if ((error = xfs_btree_check_block(cur, cblock, 0, cbp)))
624 return error;
644 STATIC int /* error */
659 int error; /* error return value */
713 error = xfs_alloc_vextent(&args);
714 if (error)
718 error = -ENOSPC;
731 error = xfs_trans_get_buf(tp, mp->m_ddev_targp,
734 if (error)
785 return error;
817 STATIC int /* error */
829 int error = 0;
852 error = 0;
871 error = xfs_alloc_vextent(&args);
872 if (error)
879 error = xfs_trans_get_buf(tp, args.mp->m_ddev_targp,
882 if (error)
918 return error;
924 STATIC int /* error */
931 int error; /* error return value */
940 error = xfs_bmbt_lookup_first(cur, &stat);
941 if (error)
945 error = -EFSCORRUPTED;
948 if ((error = xfs_btree_new_iroot(cur, flags, &stat)))
960 return error;
966 STATIC int /* error */
973 int error; /* error return value */
979 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0, flags,
983 xfs_btree_del_cursor(cur, error);
985 return error;
999 STATIC int /* error */
1062 int /* error code */
1073 int error; /* error return value */
1082 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_addafork, blks, 0,
1084 if (error)
1085 return error;
1088 error = xfs_trans_reserve_quota_nblks(tp, ip, blks, 0, rsvd ?
1091 if (error)
1098 error = xfs_bmap_set_attrforkoff(ip, size, &version);
1099 if (error)
1111 error = xfs_bmap_add_attrfork_local(tp, ip, &logflags);
1114 error = xfs_bmap_add_attrfork_extents(tp, ip, &logflags);
1117 error = xfs_bmap_add_attrfork_btree(tp, ip, &logflags);
1120 error = 0;
1125 if (error)
1145 error = xfs_trans_commit(tp);
1147 return error;
1152 return error;
1231 int error;
1236 error = -EFSCORRUPTED;
1243 error = xfs_btree_visit_blocks(cur, xfs_iread_bmbt_block,
1245 xfs_btree_del_cursor(cur, error);
1246 if (error)
1250 error = -EFSCORRUPTED;
1259 return error;
1268 int /* error */
1281 int error;
1291 error = xfs_iread_extents(tp, ip, whichfork);
1292 if (error)
1293 return error;
1318 int /* error */
1328 int error;
1343 error = xfs_iread_extents(tp, ip, whichfork);
1344 if (error)
1345 return error;
1363 int error;
1366 error = xfs_iread_extents(tp, ip, whichfork);
1367 if (error)
1368 return error;
1395 int error;
1398 error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
1400 if (error)
1401 return error;
1432 int error;
1442 error = xfs_bmap_last_extent(NULL, ip, whichfork, &rec, &is_empty);
1443 if (error || is_empty)
1444 return error;
1489 STATIC int /* error */
1497 int error; /* error return value */
1583 error = 0;
1607 error = xfs_bmbt_lookup_eq(bma->cur, &RIGHT, &i);
1608 if (error)
1611 error = -EFSCORRUPTED;
1614 error = xfs_btree_delete(bma->cur, &i);
1615 if (error)
1618 error = -EFSCORRUPTED;
1621 error = xfs_btree_decrement(bma->cur, 0, &i);
1622 if (error)
1625 error = -EFSCORRUPTED;
1628 error = xfs_bmbt_update(bma->cur, &LEFT);
1629 if (error)
1650 error = xfs_bmbt_lookup_eq(bma->cur, &old, &i);
1651 if (error)
1654 error = -EFSCORRUPTED;
1657 error = xfs_bmbt_update(bma->cur, &LEFT);
1658 if (error)
1683 error = xfs_bmbt_lookup_eq(bma->cur, &RIGHT, &i);
1684 if (error)
1687 error = -EFSCORRUPTED;
1690 error = xfs_bmbt_update(bma->cur, &PREV);
1691 if (error)
1711 error = xfs_bmbt_lookup_eq(bma->cur, new, &i);
1712 if (error)
1715 error = -EFSCORRUPTED;
1718 error = xfs_btree_insert(bma->cur, &i);
1719 if (error)
1722 error = -EFSCORRUPTED;
1752 error = xfs_bmbt_lookup_eq(bma->cur, &old, &i);
1753 if (error)
1756 error = -EFSCORRUPTED;
1759 error = xfs_bmbt_update(bma->cur, &LEFT);
1760 if (error)
1777 error = xfs_bmbt_lookup_eq(bma->cur, new, &i);
1778 if (error)
1781 error = -EFSCORRUPTED;
1784 error = xfs_btree_insert(bma->cur, &i);
1785 if (error)
1788 error = -EFSCORRUPTED;
1794 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip,
1797 if (error)
1828 error = xfs_bmbt_lookup_eq(bma->cur, &old, &i);
1829 if (error)
1832 error = -EFSCORRUPTED;
1835 error = xfs_bmbt_update(bma->cur, &RIGHT);
1836 if (error)
1864 error = xfs_bmbt_lookup_eq(bma->cur, new, &i);
1865 if (error)
1868 error = -EFSCORRUPTED;
1871 error = xfs_btree_insert(bma->cur, &i);
1872 if (error)
1875 error = -EFSCORRUPTED;
1881 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip,
1884 if (error)
1950 error = xfs_bmbt_lookup_eq(bma->cur, new, &i);
1951 if (error)
1954 error = -EFSCORRUPTED;
1957 error = xfs_btree_insert(bma->cur, &i);
1958 if (error)
1961 error = -EFSCORRUPTED;
1967 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip,
1970 if (error)
2000 error = xfs_bmap_extents_to_btree(bma->tp, bma->ip,
2004 if (error)
2019 error = xfs_mod_fdblocks(mp, (int64_t)(da_old - da_new),
2027 return error;
2036 int /* error */
2047 int error; /* error return value */
2074 error = 0;
2153 error = xfs_bmbt_lookup_eq(cur, &RIGHT, &i);
2154 if (error)
2157 error = -EFSCORRUPTED;
2160 if ((error = xfs_btree_delete(cur, &i)))
2163 error = -EFSCORRUPTED;
2166 if ((error = xfs_btree_decrement(cur, 0, &i)))
2169 error = -EFSCORRUPTED;
2172 if ((error = xfs_btree_delete(cur, &i)))
2175 error = -EFSCORRUPTED;
2178 if ((error = xfs_btree_decrement(cur, 0, &i)))
2181 error = -EFSCORRUPTED;
2184 error = xfs_bmbt_update(cur, &LEFT);
2185 if (error)
2205 error = xfs_bmbt_lookup_eq(cur, &PREV, &i);
2206 if (error)
2209 error = -EFSCORRUPTED;
2212 if ((error = xfs_btree_delete(cur, &i)))
2215 error = -EFSCORRUPTED;
2218 if ((error = xfs_btree_decrement(cur, 0, &i)))
2221 error = -EFSCORRUPTED;
2224 error = xfs_bmbt_update(cur, &LEFT);
2225 if (error)
2248 error = xfs_bmbt_lookup_eq(cur, &RIGHT, &i);
2249 if (error)
2252 error = -EFSCORRUPTED;
2255 if ((error = xfs_btree_delete(cur, &i)))
2258 error = -EFSCORRUPTED;
2261 if ((error = xfs_btree_decrement(cur, 0, &i)))
2264 error = -EFSCORRUPTED;
2267 error = xfs_bmbt_update(cur, &PREV);
2268 if (error)
2286 error = xfs_bmbt_lookup_eq(cur, new, &i);
2287 if (error)
2290 error = -EFSCORRUPTED;
2293 error = xfs_bmbt_update(cur, &PREV);
2294 if (error)
2319 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2320 if (error)
2323 error = -EFSCORRUPTED;
2326 error = xfs_bmbt_update(cur, &PREV);
2327 if (error)
2329 error = xfs_btree_decrement(cur, 0, &i);
2330 if (error)
2332 error = xfs_bmbt_update(cur, &LEFT);
2333 if (error)
2356 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2357 if (error)
2360 error = -EFSCORRUPTED;
2363 error = xfs_bmbt_update(cur, &PREV);
2364 if (error)
2367 if ((error = xfs_btree_insert(cur, &i)))
2370 error = -EFSCORRUPTED;
2396 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2397 if (error)
2400 error = -EFSCORRUPTED;
2403 error = xfs_bmbt_update(cur, &PREV);
2404 if (error)
2406 error = xfs_btree_increment(cur, 0, &i);
2407 if (error)
2409 error = xfs_bmbt_update(cur, &RIGHT);
2410 if (error)
2432 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2433 if (error)
2436 error = -EFSCORRUPTED;
2439 error = xfs_bmbt_update(cur, &PREV);
2440 if (error)
2442 error = xfs_bmbt_lookup_eq(cur, new, &i);
2443 if (error)
2446 error = -EFSCORRUPTED;
2449 if ((error = xfs_btree_insert(cur, &i)))
2452 error = -EFSCORRUPTED;
2484 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2485 if (error)
2488 error = -EFSCORRUPTED;
2492 error = xfs_bmbt_update(cur, &r[1]);
2493 if (error)
2497 if ((error = xfs_btree_insert(cur, &i)))
2500 error = -EFSCORRUPTED;
2508 error = xfs_bmbt_lookup_eq(cur, new, &i);
2509 if (error)
2512 error = -EFSCORRUPTED;
2516 if ((error = xfs_btree_insert(cur, &i)))
2519 error = -EFSCORRUPTED;
2546 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0,
2549 if (error)
2562 return error;
2711 STATIC int /* error */
2725 int error; /* error return value */
2778 error = 0;
2800 error = xfs_bmbt_lookup_eq(cur, &right, &i);
2801 if (error)
2804 error = -EFSCORRUPTED;
2807 error = xfs_btree_delete(cur, &i);
2808 if (error)
2811 error = -EFSCORRUPTED;
2814 error = xfs_btree_decrement(cur, 0, &i);
2815 if (error)
2818 error = -EFSCORRUPTED;
2821 error = xfs_bmbt_update(cur, &left);
2822 if (error)
2843 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2844 if (error)
2847 error = -EFSCORRUPTED;
2850 error = xfs_bmbt_update(cur, &left);
2851 if (error)
2873 error = xfs_bmbt_lookup_eq(cur, &old, &i);
2874 if (error)
2877 error = -EFSCORRUPTED;
2880 error = xfs_bmbt_update(cur, &right);
2881 if (error)
2899 error = xfs_bmbt_lookup_eq(cur, new, &i);
2900 if (error)
2903 error = -EFSCORRUPTED;
2906 error = xfs_btree_insert(cur, &i);
2907 if (error)
2910 error = -EFSCORRUPTED;
2926 error = xfs_bmap_extents_to_btree(tp, ip, curp, 0,
2930 if (error)
2941 return error;
3287 int error = 0;
3291 error = xfs_alloc_pagf_init(mp, tp, ag, XFS_ALLOC_FLAG_TRYLOCK);
3292 if (error) {
3294 if (error == -EAGAIN) {
3296 error = 0;
3310 return error;
3350 int error;
3360 error = xfs_bmap_longest_free_extent(args->tp, ag, blen,
3362 if (error)
3363 return error;
3384 int error;
3393 error = xfs_bmap_longest_free_extent(args->tp, ag, blen, ¬init);
3394 if (error)
3395 return error;
3398 error = xfs_filestream_new_ag(ap, &ag);
3399 if (error)
3400 return error;
3402 error = xfs_bmap_longest_free_extent(args->tp, ag, blen,
3404 if (error)
3405 return error;
3483 int error;
3504 error = xfs_bmap_extsize_align(mp, &ap->got, &ap->prev,
3507 ASSERT(!error);
3558 error = xfs_bmap_btalloc_filestreams(ap, &args, &blen);
3560 error = xfs_bmap_btalloc_nullfb(ap, &args, &blen);
3561 if (error)
3562 return error;
3645 error = xfs_alloc_vextent(&args);
3646 if (error)
3647 return error;
3660 if ((error = xfs_alloc_vextent(&args)))
3661 return error;
3671 if ((error = xfs_alloc_vextent(&args)))
3672 return error;
3679 if ((error = xfs_alloc_vextent(&args)))
3680 return error;
3686 if ((error = xfs_alloc_vextent(&args)))
3687 return error;
3880 int error;
3901 error = xfs_iread_extents(NULL, ip, whichfork);
3902 if (error)
3903 return error;
3973 int error;
3994 error = xfs_bmap_extsize_align(mp, got, &prev, extsz, 0, eof,
3996 ASSERT(!error);
4004 error = xfs_trans_reserve_quota_nblks(NULL, ip, (long)alen, 0,
4006 if (error)
4007 return error;
4016 error = xfs_mod_fdblocks(mp, -((int64_t)alen), false);
4017 if (error)
4020 error = xfs_mod_fdblocks(mp, -((int64_t)indlen), false);
4021 if (error)
4053 return error;
4062 int error;
4077 error = xfs_bmap_isaeof(bma, whichfork);
4078 if (error)
4079 return error;
4097 int error;
4123 error = xfs_bmap_btalloc(bma);
4125 error = xfs_bmap_alloc_userdata(bma);
4126 if (error || bma->blkno == NULLFSBLOCK)
4127 return error;
4130 error = xfs_zero_extent(bma->ip, bma->blkno, bma->length);
4131 if (error)
4132 return error;
4156 error = xfs_bmap_add_extent_delay_real(bma, whichfork);
4158 error = xfs_bmap_add_extent_hole_real(bma->tp, bma->ip,
4163 if (error)
4164 return error;
4191 int error;
4220 error = xfs_zero_extent(bma->ip, mval->br_startblock,
4222 if (error)
4223 return error;
4226 error = xfs_bmap_add_extent_unwritten_real(bma->tp, bma->ip, whichfork,
4241 if (error)
4242 return error;
4276 * Log whatever the flags say, even if error. Otherwise we might miss detecting
4277 * a case where the data is changed, there's an error, and it's not logged so we
4285 int error)
4299 xfs_btree_del_cursor(bma->cur, error);
4329 int error; /* error return */
4378 error = xfs_iread_extents(tp, ip, whichfork);
4379 if (error)
4435 error = xfs_bmapi_allocate(&bma);
4436 if (error)
4455 error = xfs_bmapi_convert_unwritten(&bma, mval, len, flags);
4456 if (error == -EAGAIN)
4458 if (error)
4479 error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags,
4481 if (error)
4491 xfs_bmapi_finish(&bma, whichfork, error);
4492 return error;
4515 int error;
4524 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_write, 0, 0,
4526 if (error)
4527 return error;
4540 error = -EAGAIN;
4581 error = xfs_bmapi_allocate(&bma);
4582 if (error)
4585 error = -ENOSPC;
4588 error = -EFSCORRUPTED;
4602 error = xfs_bmap_btree_to_extents(tp, ip, bma.cur, &bma.logflags,
4604 if (error)
4608 error = xfs_trans_commit(tp);
4610 return error;
4613 xfs_bmapi_finish(&bma, whichfork, error);
4617 return error;
4635 int logflags = 0, error;
4655 error = xfs_iread_extents(tp, ip, whichfork);
4656 if (error)
4657 return error;
4682 error = xfs_bmap_add_extent_hole_real(tp, ip, whichfork, &icur,
4684 if (error)
4687 error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags, whichfork);
4698 xfs_btree_del_cursor(cur, error);
4699 return error;
4802 int error = 0;
4829 error = xfs_trans_reserve_quota_nblks(NULL, ip,
4832 if (error)
4833 return error;
4913 return error;
4991 STATIC int /* error */
5005 int error; /* error return value */
5031 error = 0;
5063 error = xfs_rtfree_extent(tp, bno, (xfs_extlen_t)len);
5064 if (error)
5079 error = xfs_bmbt_lookup_eq(cur, &got, &i);
5080 if (error)
5083 error = -EFSCORRUPTED;
5107 if ((error = xfs_btree_delete(cur, &i)))
5110 error = -EFSCORRUPTED;
5126 error = xfs_bmbt_update(cur, &got);
5127 if (error)
5140 error = xfs_bmbt_update(cur, &got);
5141 if (error)
5160 error = xfs_bmbt_update(cur, &got);
5161 if (error)
5163 error = xfs_btree_increment(cur, 0, &i);
5164 if (error)
5167 error = xfs_btree_insert(cur, &i);
5168 if (error && error != -ENOSPC)
5173 * our state and return the error.
5175 if (error == -ENOSPC) {
5180 error = xfs_bmbt_lookup_eq(cur, &got, &i);
5181 if (error)
5184 error = -EFSCORRUPTED;
5191 error = xfs_bmbt_update(cur, &old);
5192 if (error)
5200 error = -ENOSPC;
5204 error = -EFSCORRUPTED;
5246 return error;
5255 int /* error */
5266 int error; /* error return value */
5310 (error = xfs_iread_extents(tp, ip, whichfork)))
5311 return error;
5442 error = xfs_bmap_add_extent_unwritten_real(tp, ip,
5445 if (error)
5501 error = xfs_bmap_add_extent_unwritten_real(tp,
5504 if (error)
5510 error = xfs_bmap_add_extent_unwritten_real(tp,
5513 if (error)
5521 error = xfs_bmap_del_extent_delay(ip, whichfork, &icur,
5524 error = xfs_bmap_del_extent_real(ip, tp, &icur, cur,
5530 if (error)
5559 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0,
5563 error = xfs_bmap_btree_to_extents(tp, ip, cur, &logflags,
5579 * Log inode even in the error case, if the transaction
5585 if (!error)
5587 xfs_btree_del_cursor(cur, error);
5589 return error;
5603 int error;
5605 error = __xfs_bunmapi(tp, ip, bno, &len, flags, nexts);
5607 return error;
5661 int error, i;
5685 error = xfs_bmbt_lookup_eq(cur, got, &i);
5686 if (error)
5687 return error;
5691 error = xfs_btree_delete(cur, &i);
5692 if (error)
5693 return error;
5698 error = xfs_bmbt_lookup_eq(cur, left, &i);
5699 if (error)
5700 return error;
5704 error = xfs_bmbt_update(cur, &new);
5705 if (error)
5706 return error;
5709 error = xfs_bmap_btree_to_extents(tp, ip, cur, logflags, whichfork);
5710 if (error)
5711 return error;
5740 int error, i;
5747 error = xfs_bmbt_lookup_eq(cur, &prev, &i);
5748 if (error)
5749 return error;
5753 error = xfs_bmbt_update(cur, got);
5754 if (error)
5755 return error;
5784 int error = 0;
5798 error = xfs_iread_extents(tp, ip, whichfork);
5799 if (error)
5800 return error;
5813 error = -EFSCORRUPTED;
5820 error = -EINVAL;
5825 error = xfs_bmse_merge(tp, ip, whichfork,
5828 if (error)
5834 error = -EINVAL;
5839 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got,
5841 if (error)
5853 xfs_btree_del_cursor(cur, error);
5856 return error;
5868 int error = 0;
5876 error = xfs_bmap_last_extent(NULL, ip, XFS_DATA_FORK, &got, &is_empty);
5877 if (!error && !is_empty && got.br_startoff >= off &&
5879 error = -EINVAL;
5882 return error;
5901 int error = 0;
5915 error = xfs_iread_extents(tp, ip, whichfork);
5916 if (error)
5917 return error;
5939 error = -EFSCORRUPTED;
5944 error = -EFSCORRUPTED;
5951 error = -EINVAL;
5965 error = xfs_bmap_shift_update_extent(tp, ip, whichfork, &icur, &got,
5967 if (error)
5979 xfs_btree_del_cursor(cur, error);
5982 return error;
6005 int error = 0;
6019 error = xfs_iread_extents(tp, ip, whichfork);
6020 if (error)
6021 return error;
6040 error = xfs_bmbt_lookup_eq(cur, &got, &i);
6041 if (error)
6044 error = -EFSCORRUPTED;
6055 error = xfs_bmbt_update(cur, &got);
6056 if (error)
6067 error = xfs_bmbt_lookup_eq(cur, &new, &i);
6068 if (error)
6071 error = -EFSCORRUPTED;
6074 error = xfs_btree_insert(cur, &i);
6075 if (error)
6078 error = -EFSCORRUPTED;
6090 error = xfs_bmap_extents_to_btree(tp, ip, &cur, 0,
6098 xfs_btree_del_cursor(cur, error);
6103 return error;
6187 int error = 0;
6205 error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
6210 error = __xfs_bunmapi(tp, ip, startoff, blockcount,
6215 error = -EFSCORRUPTED;
6218 return error;