Lines Matching refs:error

34 int					/* error */
51 * This either works (return 0) or gets an EFSCORRUPTED error.
53 STATIC int /* error */
160 int error;
162 error = xfs_btree_get_rec(cur, &rec, stat);
163 if (error || *stat == 0)
164 return error;
208 int error;
215 error = xfs_inobt_lookup(cur, thisino, XFS_LOOKUP_EQ, &i);
216 if (error) {
218 return error;
222 error = xfs_inobt_insert_rec(cur, XFS_INOBT_HOLEMASK_FULL,
226 if (error) {
228 return error;
249 int error;
252 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
253 if (error)
254 return error;
257 error = xfs_inobt_get_rec(cur, &rec, &i);
258 if (error)
259 return error;
263 error = xfs_btree_increment(cur, 0, &i);
264 if (error)
265 return error;
302 int error;
354 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d,
357 if (error)
358 return error;
551 int error;
558 error = xfs_inobt_lookup(cur, nrec->ir_startino, XFS_LOOKUP_EQ, &i);
559 if (error)
560 goto error;
563 error = xfs_inobt_insert_rec(cur, nrec->ir_holemask,
566 if (error)
567 goto error;
569 error = -EFSCORRUPTED;
570 goto error;
581 error = xfs_inobt_get_rec(cur, &rec, &i);
582 if (error)
583 goto error;
585 error = -EFSCORRUPTED;
586 goto error;
589 error = -EFSCORRUPTED;
590 goto error;
598 error = -EFSCORRUPTED;
599 goto error;
612 error = xfs_inobt_rec_check_count(mp, nrec);
613 if (error)
614 goto error;
617 error = xfs_inobt_update(cur, nrec);
618 if (error)
619 goto error;
624 error:
626 return error;
633 * inode count threshold, or the usual negative error code for other errors.
643 int error;
711 error = xfs_alloc_vextent_exact_bno(&args,
714 if (error)
715 return error;
754 error = xfs_alloc_vextent_near_bno(&args,
757 if (error)
758 return error;
767 error = xfs_alloc_vextent_near_bno(&args,
770 if (error)
771 return error;
803 error = xfs_alloc_vextent_near_bno(&args,
806 if (error)
807 return error;
828 error = xfs_ialloc_inode_init(args.mp, tp, NULL, newlen, pag->pag_agno,
831 if (error)
832 return error;
855 error = xfs_inobt_insert_sprec(pag, tp, agbp,
857 if (error == -EFSCORRUPTED) {
865 if (error)
866 return error;
880 error = xfs_inobt_insert_sprec(pag, tp, agbp,
882 if (error)
883 return error;
887 error = xfs_inobt_insert(pag, tp, agbp, newino, newlen,
889 if (error)
890 return error;
893 error = xfs_inobt_insert(pag, tp, agbp, newino,
895 if (error)
896 return error;
932 int error;
936 error = xfs_btree_decrement(cur, 0, &i);
938 error = xfs_btree_increment(cur, 0, &i);
940 if (error)
941 return error;
944 error = xfs_inobt_get_rec(cur, rec, &i);
945 if (error)
946 return error;
961 int error;
964 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_EQ, &i);
965 if (error)
966 return error;
969 error = xfs_inobt_get_rec(cur, rec, &i);
970 if (error)
971 return error;
1018 int error;
1036 error = xfs_check_agi_freecount(cur);
1037 if (error)
1047 error = xfs_inobt_lookup(cur, pagino, XFS_LOOKUP_LE, &i);
1048 if (error)
1051 error = -EFSCORRUPTED;
1055 error = xfs_inobt_get_rec(cur, &rec, &j);
1056 if (error)
1059 error = -EFSCORRUPTED;
1077 error = xfs_btree_dup_cursor(cur, &tcur);
1078 if (error)
1088 error = xfs_ialloc_get_rec(tcur, pag->pagl_leftrec,
1090 if (error)
1093 error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec,
1095 if (error)
1099 error = xfs_ialloc_next_rec(tcur, &trec, &doneleft, 1);
1100 if (error)
1104 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0);
1105 if (error)
1148 error = xfs_ialloc_next_rec(tcur, &trec,
1151 error = xfs_ialloc_next_rec(cur, &rec,
1154 if (error)
1190 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino),
1192 if (error)
1196 error = xfs_inobt_get_rec(cur, &rec, &j);
1197 if (error)
1213 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
1214 if (error)
1217 error = -EFSCORRUPTED;
1222 error = xfs_inobt_get_rec(cur, &rec, &i);
1223 if (error)
1226 error = -EFSCORRUPTED;
1231 error = xfs_btree_increment(cur, 0, &i);
1232 if (error)
1235 error = -EFSCORRUPTED;
1249 error = xfs_inobt_update(cur, &rec);
1250 if (error)
1256 error = xfs_check_agi_freecount(cur);
1257 if (error)
1268 return error;
1284 int error;
1287 error = xfs_inobt_lookup(lcur, pagino, XFS_LOOKUP_LE, &i);
1288 if (error)
1289 return error;
1292 error = xfs_inobt_get_rec(lcur, rec, &i);
1293 if (error)
1294 return error;
1308 error = xfs_btree_dup_cursor(lcur, &rcur);
1309 if (error)
1310 return error;
1312 error = xfs_inobt_lookup(rcur, pagino, XFS_LOOKUP_GE, &j);
1313 if (error)
1316 error = xfs_inobt_get_rec(rcur, &rrec, &j);
1317 if (error)
1320 error = -EFSCORRUPTED;
1326 error = -EFSCORRUPTED;
1356 return error;
1369 int error;
1373 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino),
1375 if (error)
1376 return error;
1378 error = xfs_inobt_get_rec(cur, rec, &i);
1379 if (error)
1380 return error;
1390 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
1391 if (error)
1392 return error;
1396 error = xfs_inobt_get_rec(cur, rec, &i);
1397 if (error)
1398 return error;
1416 int error;
1419 error = xfs_inobt_lookup(cur, frec->ir_startino, XFS_LOOKUP_EQ, &i);
1420 if (error)
1421 return error;
1425 error = xfs_inobt_get_rec(cur, &rec, &i);
1426 if (error)
1427 return error;
1467 int error;
1483 error = xfs_check_agi_freecount(cur);
1484 if (error)
1493 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec);
1495 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec);
1496 if (error)
1512 error = xfs_inobt_update(cur, &rec);
1514 error = xfs_btree_delete(cur, &i);
1515 if (error)
1526 error = xfs_check_agi_freecount(icur);
1527 if (error)
1530 error = xfs_dialloc_ag_update_inobt(icur, &rec, offset);
1531 if (error)
1544 error = xfs_check_agi_freecount(icur);
1545 if (error)
1547 error = xfs_check_agi_freecount(cur);
1548 if (error)
1560 return error;
1570 int error;
1586 error = xfs_trans_roll(&tp);
1592 * Join the buffer even on commit error so that the buffer is released
1594 * this error case specially.
1598 return error;
1613 int error;
1621 error = xfs_ialloc_read_agi(pag, tp, NULL);
1622 if (error)
1632 error = xfs_alloc_read_agf(pag, tp, flags, NULL);
1633 if (error)
1684 int error;
1690 error = xfs_ialloc_read_agi(pag, *tpp, &agbp);
1691 if (error)
1692 return error;
1696 error = -EAGAIN;
1700 error = xfs_ialloc_ag_alloc(pag, *tpp, agbp);
1701 if (error < 0)
1710 error = xfs_dialloc_roll(tpp, agbp);
1711 if (error)
1716 error = xfs_dialloc_ag(pag, *tpp, agbp, parent, &ino);
1717 if (!error)
1719 return error;
1723 return error;
1731 * on success, otherwise an error will be set to indicate the failure (e.g.
1743 int error = 0;
1803 error = xfs_dialloc_try_ag(pag, tpp, parent,
1805 if (error != -EAGAIN)
1807 error = 0;
1811 error = -EFSCORRUPTED;
1817 if (error)
1818 return error;
1874 int error;
1901 error = xfs_free_extent_later(tp,
1904 if (error)
1905 return error;
1930 int error;
1942 error = xfs_check_agi_freecount(cur);
1943 if (error)
1949 if ((error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i))) {
1950 xfs_warn(mp, "%s: xfs_inobt_lookup() returned error %d.",
1951 __func__, error);
1955 error = -EFSCORRUPTED;
1958 error = xfs_inobt_get_rec(cur, &rec, &i);
1959 if (error) {
1960 xfs_warn(mp, "%s: xfs_inobt_get_rec() returned error %d.",
1961 __func__, error);
1965 error = -EFSCORRUPTED;
2006 if ((error = xfs_btree_delete(cur, &i))) {
2007 xfs_warn(mp, "%s: xfs_btree_delete returned error %d.",
2008 __func__, error);
2012 error = xfs_difree_inode_chunk(tp, pag->pag_agno, &rec);
2013 if (error)
2018 error = xfs_inobt_update(cur, &rec);
2019 if (error) {
2020 xfs_warn(mp, "%s: xfs_inobt_update returned error %d.",
2021 __func__, error);
2034 error = xfs_check_agi_freecount(cur);
2035 if (error)
2044 return error;
2062 int error;
2067 error = xfs_inobt_lookup(cur, ibtrec->ir_startino, XFS_LOOKUP_EQ, &i);
2068 if (error)
2069 goto error;
2077 error = -EFSCORRUPTED;
2078 goto error;
2081 error = xfs_inobt_insert_rec(cur, ibtrec->ir_holemask,
2085 if (error)
2086 goto error;
2099 error = xfs_inobt_get_rec(cur, &rec, &i);
2100 if (error)
2101 goto error;
2103 error = -EFSCORRUPTED;
2104 goto error;
2113 error = -EFSCORRUPTED;
2114 goto error;
2131 error = xfs_btree_delete(cur, &i);
2132 if (error)
2133 goto error;
2136 error = xfs_inobt_update(cur, &rec);
2137 if (error)
2138 goto error;
2142 error = xfs_check_agi_freecount(cur);
2143 if (error)
2144 goto error;
2149 error:
2151 return error;
2171 int error; /* error return value */
2202 error = xfs_ialloc_read_agi(pag, tp, &agbp);
2203 if (error) {
2204 xfs_warn(mp, "%s: xfs_ialloc_read_agi() returned error %d.",
2205 __func__, error);
2206 return error;
2212 error = xfs_difree_inobt(pag, tp, agbp, agino, xic, &rec);
2213 if (error)
2220 error = xfs_difree_finobt(pag, tp, agbp, agino, &rec);
2221 if (error)
2228 return error;
2245 int error;
2248 error = xfs_ialloc_read_agi(pag, tp, &agbp);
2249 if (error) {
2251 "%s: xfs_ialloc_read_agi() returned error %d, agno %d",
2252 __func__, error, pag->pag_agno);
2253 return error;
2263 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i);
2264 if (!error) {
2266 error = xfs_inobt_get_rec(cur, &rec, &i);
2267 if (!error && i == 0)
2268 error = -EINVAL;
2272 xfs_btree_del_cursor(cur, error);
2273 if (error)
2274 return error;
2307 int error; /* error code */
2320 error = -EINVAL;
2327 return error;
2342 return error;
2353 error = xfs_imap_lookup(pag, tp, agino, agbno,
2355 if (error)
2356 return error;
2384 error = xfs_imap_lookup(pag, tp, agino, agbno,
2386 if (error)
2387 return error;
2405 * read_buf and panicing when we get an error from the
2594 int error;
2598 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
2601 if (error)
2602 return error;
2622 int error;
2626 error = xfs_read_agi(pag, tp, &agibp);
2627 if (error)
2628 return error;
2661 int error;
2663 error = xfs_inobt_lookup(cur, low, XFS_LOOKUP_LE, &has_record);
2664 if (error)
2665 return error;
2670 error = xfs_inobt_get_rec(cur, &irec, &has_record);
2671 if (error)
2672 return error;
2687 error = xfs_btree_increment(cur, 0, &has_record);
2688 if (error)
2689 return error;
2707 int error;
2712 error = xfs_ialloc_count_ondisk(cur, agino, last_agino, &allocated);
2713 if (error)
2714 return error;
2760 int error;
2763 error = xfs_btree_query_all(cur, xfs_ialloc_count_inodes_rec, &ci);
2764 if (error)
2765 return error;
2974 int error;
2983 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &has);
2984 if (error || !has)
2987 error = xfs_inobt_get_rec(cur, &rec, &has);
2988 if (error)
2992 error = -EFSCORRUPTED;
2998 error = -ENOSPC;
3002 xfs_btree_del_cursor(cur, error);
3003 return error;