Lines Matching refs:error

35 int					/* error */
52 * This either works (return 0) or gets an EFSCORRUPTED error.
54 STATIC int /* error */
166 int error;
168 error = xfs_btree_get_rec(cur, &rec, stat);
169 if (error || *stat == 0)
170 return error;
214 int error;
224 error = xfs_inobt_lookup(cur, thisino, XFS_LOOKUP_EQ, &i);
225 if (error) {
227 return error;
231 error = xfs_inobt_insert_rec(cur, XFS_INOBT_HOLEMASK_FULL,
235 if (error) {
237 return error;
258 int error;
261 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
262 if (error)
263 return error;
266 error = xfs_inobt_get_rec(cur, &rec, &i);
267 if (error)
268 return error;
272 error = xfs_btree_increment(cur, 0, &i);
273 if (error)
274 return error;
311 int error;
363 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d,
366 if (error)
367 return error;
556 int error;
563 error = xfs_inobt_lookup(cur, nrec->ir_startino, XFS_LOOKUP_EQ, &i);
564 if (error)
565 goto error;
568 error = xfs_inobt_insert_rec(cur, nrec->ir_holemask,
571 if (error)
572 goto error;
575 error = -EFSCORRUPTED;
576 goto error;
585 error = xfs_inobt_get_rec(cur, &rec, &i);
586 if (error)
587 goto error;
590 error = -EFSCORRUPTED;
591 goto error;
595 error = -EFSCORRUPTED;
596 goto error;
605 error = -EFSCORRUPTED;
606 goto error;
619 error = xfs_inobt_rec_check_count(mp, nrec);
620 if (error)
621 goto error;
623 error = xfs_inobt_update(cur, nrec);
624 if (error)
625 goto error;
630 error:
632 return error;
653 int error;
659 error = xfs_inobt_lookup(cur, nrec->ir_startino, XFS_LOOKUP_EQ, &i);
660 if (error)
661 goto error;
664 error = xfs_inobt_insert_rec(cur, nrec->ir_holemask,
667 if (error)
668 goto error;
671 error = -EFSCORRUPTED;
672 goto error;
675 error = xfs_inobt_update(cur, nrec);
676 if (error)
677 goto error;
682 error:
684 return error;
692 * inode count threshold, or the usual negative error code for other errors.
702 int error;
770 error = xfs_alloc_vextent_exact_bno(&args,
773 if (error)
774 return error;
813 error = xfs_alloc_vextent_near_bno(&args,
816 if (error)
817 return error;
826 error = xfs_alloc_vextent_near_bno(&args,
829 if (error)
830 return error;
862 error = xfs_alloc_vextent_near_bno(&args,
865 if (error)
866 return error;
887 error = xfs_ialloc_inode_init(args.mp, tp, NULL, newlen, pag->pag_agno,
890 if (error)
891 return error;
914 error = xfs_inobt_insert_sprec(pag, tp, agbp, &rec);
915 if (error == -EFSCORRUPTED) {
923 if (error)
924 return error;
938 error = xfs_finobt_insert_sprec(pag, tp, agbp, &rec);
939 if (error)
940 return error;
944 error = xfs_inobt_insert(pag, tp, agbp, newino, newlen, false);
945 if (error)
946 return error;
949 error = xfs_inobt_insert(pag, tp, agbp, newino,
951 if (error)
952 return error;
988 int error;
992 error = xfs_btree_decrement(cur, 0, &i);
994 error = xfs_btree_increment(cur, 0, &i);
996 if (error)
997 return error;
1000 error = xfs_inobt_get_rec(cur, rec, &i);
1001 if (error)
1002 return error;
1019 int error;
1022 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_EQ, &i);
1023 if (error)
1024 return error;
1027 error = xfs_inobt_get_rec(cur, rec, &i);
1028 if (error)
1029 return error;
1078 int error;
1096 error = xfs_check_agi_freecount(cur);
1097 if (error)
1107 error = xfs_inobt_lookup(cur, pagino, XFS_LOOKUP_LE, &i);
1108 if (error)
1112 error = -EFSCORRUPTED;
1116 error = xfs_inobt_get_rec(cur, &rec, &j);
1117 if (error)
1121 error = -EFSCORRUPTED;
1139 error = xfs_btree_dup_cursor(cur, &tcur);
1140 if (error)
1150 error = xfs_ialloc_get_rec(tcur, pag->pagl_leftrec,
1152 if (error)
1155 error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec,
1157 if (error)
1161 error = xfs_ialloc_next_rec(tcur, &trec, &doneleft, 1);
1162 if (error)
1166 error = xfs_ialloc_next_rec(cur, &rec, &doneright, 0);
1167 if (error)
1210 error = xfs_ialloc_next_rec(tcur, &trec,
1213 error = xfs_ialloc_next_rec(cur, &rec,
1216 if (error)
1252 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino),
1254 if (error)
1258 error = xfs_inobt_get_rec(cur, &rec, &j);
1259 if (error)
1275 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
1276 if (error)
1280 error = -EFSCORRUPTED;
1285 error = xfs_inobt_get_rec(cur, &rec, &i);
1286 if (error)
1290 error = -EFSCORRUPTED;
1295 error = xfs_btree_increment(cur, 0, &i);
1296 if (error)
1300 error = -EFSCORRUPTED;
1314 error = xfs_inobt_update(cur, &rec);
1315 if (error)
1321 error = xfs_check_agi_freecount(cur);
1322 if (error)
1333 return error;
1349 int error;
1352 error = xfs_inobt_lookup(lcur, pagino, XFS_LOOKUP_LE, &i);
1353 if (error)
1354 return error;
1357 error = xfs_inobt_get_rec(lcur, rec, &i);
1358 if (error)
1359 return error;
1375 error = xfs_btree_dup_cursor(lcur, &rcur);
1376 if (error)
1377 return error;
1379 error = xfs_inobt_lookup(rcur, pagino, XFS_LOOKUP_GE, &j);
1380 if (error)
1383 error = xfs_inobt_get_rec(rcur, &rrec, &j);
1384 if (error)
1388 error = -EFSCORRUPTED;
1395 error = -EFSCORRUPTED;
1425 return error;
1438 int error;
1442 error = xfs_inobt_lookup(cur, be32_to_cpu(agi->agi_newino),
1444 if (error)
1445 return error;
1447 error = xfs_inobt_get_rec(cur, rec, &i);
1448 if (error)
1449 return error;
1461 error = xfs_inobt_lookup(cur, 0, XFS_LOOKUP_GE, &i);
1462 if (error)
1463 return error;
1469 error = xfs_inobt_get_rec(cur, rec, &i);
1470 if (error)
1471 return error;
1491 int error;
1494 error = xfs_inobt_lookup(cur, frec->ir_startino, XFS_LOOKUP_EQ, &i);
1495 if (error)
1496 return error;
1502 error = xfs_inobt_get_rec(cur, &rec, &i);
1503 if (error)
1504 return error;
1548 int error;
1564 error = xfs_check_agi_freecount(cur);
1565 if (error)
1574 error = xfs_dialloc_ag_finobt_near(pagino, &cur, &rec);
1576 error = xfs_dialloc_ag_finobt_newino(agi, cur, &rec);
1577 if (error)
1593 error = xfs_inobt_update(cur, &rec);
1595 error = xfs_btree_delete(cur, &i);
1596 if (error)
1607 error = xfs_check_agi_freecount(icur);
1608 if (error)
1611 error = xfs_dialloc_ag_update_inobt(icur, &rec, offset);
1612 if (error)
1625 error = xfs_check_agi_freecount(icur);
1626 if (error)
1628 error = xfs_check_agi_freecount(cur);
1629 if (error)
1641 return error;
1651 int error;
1667 error = xfs_trans_roll(&tp);
1673 * Join the buffer even on commit error so that the buffer is released
1675 * this error case specially.
1679 return error;
1694 int error;
1702 error = xfs_ialloc_read_agi(pag, tp, NULL);
1703 if (error)
1713 error = xfs_alloc_read_agf(pag, tp, flags, NULL);
1714 if (error)
1765 int error;
1771 error = xfs_ialloc_read_agi(pag, *tpp, &agbp);
1772 if (error)
1773 return error;
1777 error = -EAGAIN;
1781 error = xfs_ialloc_ag_alloc(pag, *tpp, agbp);
1782 if (error < 0)
1791 error = xfs_dialloc_roll(tpp, agbp);
1792 if (error)
1797 error = xfs_dialloc_ag(pag, *tpp, agbp, parent, &ino);
1798 if (!error)
1800 return error;
1804 return error;
1812 * on success, otherwise an error will be set to indicate the failure (e.g.
1824 int error = 0;
1884 error = xfs_dialloc_try_ag(pag, tpp, parent,
1886 if (error != -EAGAIN)
1888 error = 0;
1892 error = -EFSCORRUPTED;
1898 if (error)
1899 return error;
1955 int error;
1982 error = xfs_free_extent_later(tp,
1986 if (error)
1987 return error;
2012 int error;
2024 error = xfs_check_agi_freecount(cur);
2025 if (error)
2031 if ((error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i))) {
2032 xfs_warn(mp, "%s: xfs_inobt_lookup() returned error %d.",
2033 __func__, error);
2038 error = -EFSCORRUPTED;
2041 error = xfs_inobt_get_rec(cur, &rec, &i);
2042 if (error) {
2043 xfs_warn(mp, "%s: xfs_inobt_get_rec() returned error %d.",
2044 __func__, error);
2049 error = -EFSCORRUPTED;
2090 if ((error = xfs_btree_delete(cur, &i))) {
2091 xfs_warn(mp, "%s: xfs_btree_delete returned error %d.",
2092 __func__, error);
2096 error = xfs_difree_inode_chunk(tp, pag->pag_agno, &rec);
2097 if (error)
2102 error = xfs_inobt_update(cur, &rec);
2103 if (error) {
2104 xfs_warn(mp, "%s: xfs_inobt_update returned error %d.",
2105 __func__, error);
2118 error = xfs_check_agi_freecount(cur);
2119 if (error)
2128 return error;
2146 int error;
2151 error = xfs_inobt_lookup(cur, ibtrec->ir_startino, XFS_LOOKUP_EQ, &i);
2152 if (error)
2153 goto error;
2162 error = -EFSCORRUPTED;
2163 goto error;
2166 error = xfs_inobt_insert_rec(cur, ibtrec->ir_holemask,
2170 if (error)
2171 goto error;
2184 error = xfs_inobt_get_rec(cur, &rec, &i);
2185 if (error)
2186 goto error;
2189 error = -EFSCORRUPTED;
2190 goto error;
2200 error = -EFSCORRUPTED;
2201 goto error;
2218 error = xfs_btree_delete(cur, &i);
2219 if (error)
2220 goto error;
2223 error = xfs_inobt_update(cur, &rec);
2224 if (error)
2225 goto error;
2229 error = xfs_check_agi_freecount(cur);
2230 if (error)
2231 goto error;
2236 error:
2238 return error;
2258 int error; /* error return value */
2289 error = xfs_ialloc_read_agi(pag, tp, &agbp);
2290 if (error) {
2291 xfs_warn(mp, "%s: xfs_ialloc_read_agi() returned error %d.",
2292 __func__, error);
2293 return error;
2299 error = xfs_difree_inobt(pag, tp, agbp, agino, xic, &rec);
2300 if (error)
2307 error = xfs_difree_finobt(pag, tp, agbp, agino, &rec);
2308 if (error)
2315 return error;
2332 int error;
2335 error = xfs_ialloc_read_agi(pag, tp, &agbp);
2336 if (error) {
2338 "%s: xfs_ialloc_read_agi() returned error %d, agno %d",
2339 __func__, error, pag->pag_agno);
2340 return error;
2350 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &i);
2351 if (!error) {
2353 error = xfs_inobt_get_rec(cur, &rec, &i);
2354 if (!error && i == 0)
2355 error = -EINVAL;
2359 xfs_btree_del_cursor(cur, error);
2360 if (error)
2361 return error;
2394 int error; /* error code */
2407 error = -EINVAL;
2414 return error;
2429 return error;
2440 error = xfs_imap_lookup(pag, tp, agino, agbno,
2442 if (error)
2443 return error;
2471 error = xfs_imap_lookup(pag, tp, agino, agbno,
2473 if (error)
2474 return error;
2492 * read_buf and panicing when we get an error from the
2681 int error;
2685 error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
2688 if (xfs_metadata_is_sick(error))
2690 if (error)
2691 return error;
2711 int error;
2715 error = xfs_read_agi(pag, tp, &agibp);
2716 if (error)
2717 return error;
2750 int error;
2752 error = xfs_inobt_lookup(cur, low, XFS_LOOKUP_LE, &has_record);
2753 if (error)
2754 return error;
2759 error = xfs_inobt_get_rec(cur, &irec, &has_record);
2760 if (error)
2761 return error;
2776 error = xfs_btree_increment(cur, 0, &has_record);
2777 if (error)
2778 return error;
2796 int error;
2801 error = xfs_ialloc_count_ondisk(cur, agino, last_agino, &allocated);
2802 if (error)
2803 return error;
2849 int error;
2852 error = xfs_btree_query_all(cur, xfs_ialloc_count_inodes_rec, &ci);
2853 if (error)
2854 return error;
3063 int error;
3072 error = xfs_inobt_lookup(cur, agino, XFS_LOOKUP_LE, &has);
3073 if (error || !has)
3076 error = xfs_inobt_get_rec(cur, &rec, &has);
3077 if (error)
3082 error = -EFSCORRUPTED;
3088 error = -ENOSPC;
3092 xfs_btree_del_cursor(cur, error);
3093 return error;