Lines Matching refs:error
57 int error; /* error value */ in xfs_rtany_summary() local
72 error = xfs_rtget_summary(mp, tp, log, bbno, rbpp, rsb, &sum); in xfs_rtany_summary()
73 if (error) { in xfs_rtany_summary()
74 return error; in xfs_rtany_summary()
108 int error; /* error return value */ in xfs_rtcopy_summary() local
118 error = xfs_rtget_summary(omp, tp, log, bbno, &bp, in xfs_rtcopy_summary()
120 if (error) in xfs_rtcopy_summary()
121 return error; in xfs_rtcopy_summary()
124 error = xfs_rtmodify_summary(omp, tp, log, bbno, -sum, in xfs_rtcopy_summary()
126 if (error) in xfs_rtcopy_summary()
127 return error; in xfs_rtcopy_summary()
128 error = xfs_rtmodify_summary(nmp, tp, log, bbno, sum, in xfs_rtcopy_summary()
130 if (error) in xfs_rtcopy_summary()
131 return error; in xfs_rtcopy_summary()
151 int error; /* error value */ in xfs_rtallocate_range() local
161 error = xfs_rtfind_back(mp, tp, start, 0, &preblock); in xfs_rtallocate_range()
162 if (error) { in xfs_rtallocate_range()
163 return error; in xfs_rtallocate_range()
168 error = xfs_rtfind_forw(mp, tp, end, mp->m_sb.sb_rextents - 1, in xfs_rtallocate_range()
170 if (error) { in xfs_rtallocate_range()
171 return error; in xfs_rtallocate_range()
177 error = xfs_rtmodify_summary(mp, tp, in xfs_rtallocate_range()
180 if (error) { in xfs_rtallocate_range()
181 return error; in xfs_rtallocate_range()
188 error = xfs_rtmodify_summary(mp, tp, in xfs_rtallocate_range()
191 if (error) { in xfs_rtallocate_range()
192 return error; in xfs_rtallocate_range()
200 error = xfs_rtmodify_summary(mp, tp, in xfs_rtallocate_range()
203 if (error) { in xfs_rtallocate_range()
204 return error; in xfs_rtallocate_range()
210 error = xfs_rtmodify_range(mp, tp, start, len, 0); in xfs_rtallocate_range()
211 return error; in xfs_rtallocate_range()
237 int error; /* error value */ in xfs_rtallocate_extent_block() local
257 error = xfs_rtcheck_range(mp, tp, i, maxlen, 1, &next, &stat); in xfs_rtallocate_extent_block()
258 if (error) { in xfs_rtallocate_extent_block()
259 return error; in xfs_rtallocate_extent_block()
265 error = xfs_rtallocate_range(mp, tp, i, maxlen, rbpp, in xfs_rtallocate_extent_block()
267 if (error) { in xfs_rtallocate_extent_block()
268 return error; in xfs_rtallocate_extent_block()
293 error = xfs_rtfind_forw(mp, tp, next, end, &i); in xfs_rtallocate_extent_block()
294 if (error) { in xfs_rtallocate_extent_block()
295 return error; in xfs_rtallocate_extent_block()
318 error = xfs_rtallocate_range(mp, tp, besti, bestlen, rbpp, rsb); in xfs_rtallocate_extent_block()
319 if (error) { in xfs_rtallocate_extent_block()
320 return error; in xfs_rtallocate_extent_block()
353 int error; /* error value */ in xfs_rtallocate_extent_exact() local
362 error = xfs_rtcheck_range(mp, tp, bno, maxlen, 1, &next, &isfree); in xfs_rtallocate_extent_exact()
363 if (error) { in xfs_rtallocate_extent_exact()
364 return error; in xfs_rtallocate_extent_exact()
370 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
371 if (error) { in xfs_rtallocate_extent_exact()
372 return error; in xfs_rtallocate_extent_exact()
405 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
406 if (error) { in xfs_rtallocate_extent_exact()
407 return error; in xfs_rtallocate_extent_exact()
434 int error; /* error value */ in xfs_rtallocate_extent_near() local
459 error = xfs_rtallocate_extent_exact(mp, tp, bno, minlen, maxlen, len, in xfs_rtallocate_extent_near()
461 if (error) { in xfs_rtallocate_extent_near()
462 return error; in xfs_rtallocate_extent_near()
483 error = xfs_rtany_summary(mp, tp, log2len, mp->m_rsumlevels - 1, in xfs_rtallocate_extent_near()
485 if (error) { in xfs_rtallocate_extent_near()
486 return error; in xfs_rtallocate_extent_near()
501 error = xfs_rtallocate_extent_block(mp, tp, in xfs_rtallocate_extent_near()
504 if (error) { in xfs_rtallocate_extent_near()
505 return error; in xfs_rtallocate_extent_near()
530 error = xfs_rtany_summary(mp, tp, in xfs_rtallocate_extent_near()
533 if (error) { in xfs_rtallocate_extent_near()
534 return error; in xfs_rtallocate_extent_near()
546 error = xfs_rtallocate_extent_block(mp, in xfs_rtallocate_extent_near()
549 if (error) { in xfs_rtallocate_extent_near()
550 return error; in xfs_rtallocate_extent_near()
568 error = xfs_rtallocate_extent_block(mp, tp, in xfs_rtallocate_extent_near()
571 if (error) { in xfs_rtallocate_extent_near()
572 return error; in xfs_rtallocate_extent_near()
634 int error; /* error value */ in xfs_rtallocate_extent_size() local
659 error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, in xfs_rtallocate_extent_size()
661 if (error) { in xfs_rtallocate_extent_size()
662 return error; in xfs_rtallocate_extent_size()
672 error = xfs_rtallocate_extent_block(mp, tp, i, maxlen, in xfs_rtallocate_extent_size()
674 if (error) { in xfs_rtallocate_extent_size()
675 return error; in xfs_rtallocate_extent_size()
718 error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, in xfs_rtallocate_extent_size()
720 if (error) { in xfs_rtallocate_extent_size()
721 return error; in xfs_rtallocate_extent_size()
733 error = xfs_rtallocate_extent_block(mp, tp, i, in xfs_rtallocate_extent_size()
737 if (error) { in xfs_rtallocate_extent_size()
738 return error; in xfs_rtallocate_extent_size()
776 int error; /* error return value */ in xfs_growfs_rt_alloc() local
797 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtalloc, resblks, in xfs_growfs_rt_alloc()
799 if (error) in xfs_growfs_rt_alloc()
800 return error; in xfs_growfs_rt_alloc()
807 error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK, in xfs_growfs_rt_alloc()
809 if (error == -EFBIG) in xfs_growfs_rt_alloc()
810 error = xfs_iext_count_upgrade(tp, ip, in xfs_growfs_rt_alloc()
812 if (error) in xfs_growfs_rt_alloc()
819 error = xfs_bmapi_write(tp, ip, oblocks, nblocks - oblocks, in xfs_growfs_rt_alloc()
821 if (!error && nmap < 1) in xfs_growfs_rt_alloc()
822 error = -ENOSPC; in xfs_growfs_rt_alloc()
823 if (error) in xfs_growfs_rt_alloc()
828 error = xfs_trans_commit(tp); in xfs_growfs_rt_alloc()
829 if (error) in xfs_growfs_rt_alloc()
830 return error; in xfs_growfs_rt_alloc()
841 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtzero, in xfs_growfs_rt_alloc()
843 if (error) in xfs_growfs_rt_alloc()
844 return error; in xfs_growfs_rt_alloc()
854 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, in xfs_growfs_rt_alloc()
856 if (error) in xfs_growfs_rt_alloc()
866 error = xfs_trans_commit(tp); in xfs_growfs_rt_alloc()
867 if (error) in xfs_growfs_rt_alloc()
868 return error; in xfs_growfs_rt_alloc()
880 return error; in xfs_growfs_rt_alloc()
912 int error; /* error return value */ in xfs_growfs_rt() local
961 error = xfs_sb_validate_fsb_count(sbp, nrblocks); in xfs_growfs_rt()
962 if (error) in xfs_growfs_rt()
963 return error; in xfs_growfs_rt()
967 error = xfs_buf_read_uncached(mp->m_rtdev_targp, in xfs_growfs_rt()
970 if (error) in xfs_growfs_rt()
971 return error; in xfs_growfs_rt()
1001 error = xfs_growfs_rt_alloc(mp, rbmblocks, nrbmblocks, mp->m_rbmip); in xfs_growfs_rt()
1002 if (error) in xfs_growfs_rt()
1003 return error; in xfs_growfs_rt()
1004 error = xfs_growfs_rt_alloc(mp, rsumblocks, nrsumblocks, mp->m_rsumip); in xfs_growfs_rt()
1005 if (error) in xfs_growfs_rt()
1006 return error; in xfs_growfs_rt()
1052 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtfree, 0, 0, 0, in xfs_growfs_rt()
1054 if (error) in xfs_growfs_rt()
1089 error = xfs_rtcopy_summary(mp, nmp, tp); in xfs_growfs_rt()
1090 if (error) in xfs_growfs_rt()
1115 error = xfs_rtfree_range(nmp, tp, sbp->sb_rextents, in xfs_growfs_rt()
1117 if (error) { in xfs_growfs_rt()
1133 error = xfs_trans_commit(tp); in xfs_growfs_rt()
1134 if (error) in xfs_growfs_rt()
1140 if (error) in xfs_growfs_rt()
1144 error = xfs_update_secondary_sbs(mp); in xfs_growfs_rt()
1158 if (error) { in xfs_growfs_rt()
1166 return error; in xfs_growfs_rt()
1186 int error; /* error value */ in xfs_rtallocate_extent() local
1213 error = xfs_rtallocate_extent_size(mp, tp, minlen, maxlen, len, in xfs_rtallocate_extent()
1216 error = xfs_rtallocate_extent_near(mp, tp, bno, minlen, maxlen, in xfs_rtallocate_extent()
1220 if (error) in xfs_rtallocate_extent()
1221 return error; in xfs_rtallocate_extent()
1253 int error; in xfs_rtmount_init() local
1279 error = xfs_buf_read_uncached(mp->m_rtdev_targp, in xfs_rtmount_init()
1282 if (error) { in xfs_rtmount_init()
1284 return error; in xfs_rtmount_init()
1312 int error; in xfs_rtalloc_reinit_frextents() local
1315 error = xfs_rtalloc_query_all(mp, NULL, xfs_rtalloc_count_frextent, in xfs_rtalloc_reinit_frextents()
1318 if (error) in xfs_rtalloc_reinit_frextents()
1319 return error; in xfs_rtalloc_reinit_frextents()
1339 int error; in xfs_rtmount_iread_extents() local
1341 error = xfs_trans_alloc_empty(ip->i_mount, &tp); in xfs_rtmount_iread_extents()
1342 if (error) in xfs_rtmount_iread_extents()
1343 return error; in xfs_rtmount_iread_extents()
1347 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_rtmount_iread_extents()
1348 if (error) in xfs_rtmount_iread_extents()
1352 error = xfs_iread_extents(tp, ip, XFS_ATTR_FORK); in xfs_rtmount_iread_extents()
1353 if (error) in xfs_rtmount_iread_extents()
1360 return error; in xfs_rtmount_iread_extents()
1371 int error; /* error return value */ in xfs_rtmount_inodes() local
1375 error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip); in xfs_rtmount_inodes()
1376 if (error) in xfs_rtmount_inodes()
1377 return error; in xfs_rtmount_inodes()
1380 error = xfs_rtmount_iread_extents(mp->m_rbmip, XFS_ILOCK_RTBITMAP); in xfs_rtmount_inodes()
1381 if (error) in xfs_rtmount_inodes()
1384 error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip); in xfs_rtmount_inodes()
1385 if (error) in xfs_rtmount_inodes()
1389 error = xfs_rtmount_iread_extents(mp->m_rsumip, XFS_ILOCK_RTSUM); in xfs_rtmount_inodes()
1390 if (error) in xfs_rtmount_inodes()
1400 return error; in xfs_rtmount_inodes()