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()
254 int error; /* error value */ in xfs_rtallocate_extent_block() local
274 error = xfs_rtcheck_range(mp, tp, i, maxlen, 1, &next, &stat); in xfs_rtallocate_extent_block()
275 if (error) { in xfs_rtallocate_extent_block()
276 return error; in xfs_rtallocate_extent_block()
282 error = xfs_rtallocate_range(mp, tp, i, maxlen, rbpp, in xfs_rtallocate_extent_block()
284 if (error) { in xfs_rtallocate_extent_block()
285 return error; in xfs_rtallocate_extent_block()
310 error = xfs_rtfind_forw(mp, tp, next, end, &i); in xfs_rtallocate_extent_block()
311 if (error) { in xfs_rtallocate_extent_block()
312 return error; in xfs_rtallocate_extent_block()
335 error = xfs_rtallocate_range(mp, tp, besti, bestlen, rbpp, rsb); in xfs_rtallocate_extent_block()
336 if (error) { in xfs_rtallocate_extent_block()
337 return error; in xfs_rtallocate_extent_block()
370 int error; /* error value */ in xfs_rtallocate_extent_exact() local
380 error = xfs_rtcheck_range(mp, tp, bno, maxlen, 1, &next, &isfree); in xfs_rtallocate_extent_exact()
381 if (error) { in xfs_rtallocate_extent_exact()
382 return error; in xfs_rtallocate_extent_exact()
388 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
389 if (error) { in xfs_rtallocate_extent_exact()
390 return error; in xfs_rtallocate_extent_exact()
423 error = xfs_rtallocate_range(mp, tp, bno, maxlen, rbpp, rsb); in xfs_rtallocate_extent_exact()
424 if (error) { in xfs_rtallocate_extent_exact()
425 return error; in xfs_rtallocate_extent_exact()
452 int error; /* error value */ in xfs_rtallocate_extent_near() local
479 error = xfs_rtallocate_extent_exact(mp, tp, bno, minlen, maxlen, len, in xfs_rtallocate_extent_near()
481 if (error) { in xfs_rtallocate_extent_near()
482 return error; in xfs_rtallocate_extent_near()
503 error = xfs_rtany_summary(mp, tp, log2len, mp->m_rsumlevels - 1, in xfs_rtallocate_extent_near()
505 if (error) { in xfs_rtallocate_extent_near()
506 return error; in xfs_rtallocate_extent_near()
521 error = xfs_rtallocate_extent_block(mp, tp, in xfs_rtallocate_extent_near()
524 if (error) { in xfs_rtallocate_extent_near()
525 return error; in xfs_rtallocate_extent_near()
550 error = xfs_rtany_summary(mp, tp, in xfs_rtallocate_extent_near()
553 if (error) { in xfs_rtallocate_extent_near()
554 return error; in xfs_rtallocate_extent_near()
566 error = xfs_rtallocate_extent_block(mp, in xfs_rtallocate_extent_near()
569 if (error) { in xfs_rtallocate_extent_near()
570 return error; in xfs_rtallocate_extent_near()
588 error = xfs_rtallocate_extent_block(mp, tp, in xfs_rtallocate_extent_near()
591 if (error) { in xfs_rtallocate_extent_near()
592 return error; in xfs_rtallocate_extent_near()
654 int error; /* error value */ in xfs_rtallocate_extent_size() local
680 error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, in xfs_rtallocate_extent_size()
682 if (error) { in xfs_rtallocate_extent_size()
683 return error; in xfs_rtallocate_extent_size()
693 error = xfs_rtallocate_extent_block(mp, tp, i, maxlen, in xfs_rtallocate_extent_size()
695 if (error) { in xfs_rtallocate_extent_size()
696 return error; in xfs_rtallocate_extent_size()
739 error = xfs_rtget_summary(mp, tp, l, i, rbpp, rsb, in xfs_rtallocate_extent_size()
741 if (error) { in xfs_rtallocate_extent_size()
742 return error; in xfs_rtallocate_extent_size()
754 error = xfs_rtallocate_extent_block(mp, tp, i, in xfs_rtallocate_extent_size()
758 if (error) { in xfs_rtallocate_extent_size()
759 return error; in xfs_rtallocate_extent_size()
797 int error; /* error return value */ in xfs_growfs_rt_alloc() local
818 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtalloc, resblks, in xfs_growfs_rt_alloc()
820 if (error) in xfs_growfs_rt_alloc()
821 return error; in xfs_growfs_rt_alloc()
828 error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK, in xfs_growfs_rt_alloc()
830 if (error == -EFBIG) in xfs_growfs_rt_alloc()
831 error = xfs_iext_count_upgrade(tp, ip, in xfs_growfs_rt_alloc()
833 if (error) in xfs_growfs_rt_alloc()
840 error = xfs_bmapi_write(tp, ip, oblocks, nblocks - oblocks, in xfs_growfs_rt_alloc()
842 if (!error && nmap < 1) in xfs_growfs_rt_alloc()
843 error = -ENOSPC; in xfs_growfs_rt_alloc()
844 if (error) in xfs_growfs_rt_alloc()
849 error = xfs_trans_commit(tp); in xfs_growfs_rt_alloc()
850 if (error) in xfs_growfs_rt_alloc()
851 return error; in xfs_growfs_rt_alloc()
862 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtzero, in xfs_growfs_rt_alloc()
864 if (error) in xfs_growfs_rt_alloc()
865 return error; in xfs_growfs_rt_alloc()
875 error = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, in xfs_growfs_rt_alloc()
877 if (error) in xfs_growfs_rt_alloc()
887 error = xfs_trans_commit(tp); in xfs_growfs_rt_alloc()
888 if (error) in xfs_growfs_rt_alloc()
889 return error; in xfs_growfs_rt_alloc()
901 return error; in xfs_growfs_rt_alloc()
933 int error; /* error return value */ in xfs_growfs_rt() local
982 error = xfs_sb_validate_fsb_count(sbp, nrblocks); in xfs_growfs_rt()
983 if (error) in xfs_growfs_rt()
984 return error; in xfs_growfs_rt()
988 error = xfs_buf_read_uncached(mp->m_rtdev_targp, in xfs_growfs_rt()
991 if (error) in xfs_growfs_rt()
992 return error; in xfs_growfs_rt()
1022 error = xfs_growfs_rt_alloc(mp, rbmblocks, nrbmblocks, mp->m_rbmip); in xfs_growfs_rt()
1023 if (error) in xfs_growfs_rt()
1024 return error; in xfs_growfs_rt()
1025 error = xfs_growfs_rt_alloc(mp, rsumblocks, nrsumblocks, mp->m_rsumip); in xfs_growfs_rt()
1026 if (error) in xfs_growfs_rt()
1027 return error; in xfs_growfs_rt()
1073 error = xfs_trans_alloc(mp, &M_RES(mp)->tr_growrtfree, 0, 0, 0, in xfs_growfs_rt()
1075 if (error) in xfs_growfs_rt()
1110 error = xfs_rtcopy_summary(mp, nmp, tp); in xfs_growfs_rt()
1111 if (error) in xfs_growfs_rt()
1136 error = xfs_rtfree_range(nmp, tp, sbp->sb_rextents, in xfs_growfs_rt()
1138 if (error) { in xfs_growfs_rt()
1154 error = xfs_trans_commit(tp); in xfs_growfs_rt()
1155 if (error) in xfs_growfs_rt()
1161 if (error) in xfs_growfs_rt()
1165 error = xfs_update_secondary_sbs(mp); in xfs_growfs_rt()
1179 if (error) { in xfs_growfs_rt()
1187 return error; in xfs_growfs_rt()
1207 int error; /* error value */ in xfs_rtallocate_extent() local
1234 error = xfs_rtallocate_extent_size(mp, tp, minlen, maxlen, len, in xfs_rtallocate_extent()
1237 error = xfs_rtallocate_extent_near(mp, tp, bno, minlen, maxlen, in xfs_rtallocate_extent()
1241 if (error) in xfs_rtallocate_extent()
1242 return error; in xfs_rtallocate_extent()
1274 int error; in xfs_rtmount_init() local
1300 error = xfs_buf_read_uncached(mp->m_rtdev_targp, in xfs_rtmount_init()
1303 if (error) { in xfs_rtmount_init()
1305 return error; in xfs_rtmount_init()
1333 int error; in xfs_rtalloc_reinit_frextents() local
1336 error = xfs_rtalloc_query_all(mp, NULL, xfs_rtalloc_count_frextent, in xfs_rtalloc_reinit_frextents()
1339 if (error) in xfs_rtalloc_reinit_frextents()
1340 return error; in xfs_rtalloc_reinit_frextents()
1360 int error; in xfs_rtmount_iread_extents() local
1362 error = xfs_trans_alloc_empty(ip->i_mount, &tp); in xfs_rtmount_iread_extents()
1363 if (error) in xfs_rtmount_iread_extents()
1364 return error; in xfs_rtmount_iread_extents()
1368 error = xfs_iread_extents(tp, ip, XFS_DATA_FORK); in xfs_rtmount_iread_extents()
1369 if (error) in xfs_rtmount_iread_extents()
1373 error = xfs_iread_extents(tp, ip, XFS_ATTR_FORK); in xfs_rtmount_iread_extents()
1374 if (error) in xfs_rtmount_iread_extents()
1381 return error; in xfs_rtmount_iread_extents()
1392 int error; /* error return value */ in xfs_rtmount_inodes() local
1396 error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip); in xfs_rtmount_inodes()
1397 if (error) in xfs_rtmount_inodes()
1398 return error; in xfs_rtmount_inodes()
1401 error = xfs_rtmount_iread_extents(mp->m_rbmip, XFS_ILOCK_RTBITMAP); in xfs_rtmount_inodes()
1402 if (error) in xfs_rtmount_inodes()
1405 error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip); in xfs_rtmount_inodes()
1406 if (error) in xfs_rtmount_inodes()
1410 error = xfs_rtmount_iread_extents(mp->m_rsumip, XFS_ILOCK_RTSUM); in xfs_rtmount_inodes()
1411 if (error) in xfs_rtmount_inodes()
1421 return error; in xfs_rtmount_inodes()