Lines Matching refs:status
350 int status = 0; in ocfs2_block_group_fill() local
356 status = ocfs2_error(alloc_inode->i_sb, in ocfs2_block_group_fill()
363 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_fill()
367 if (status < 0) { in ocfs2_block_group_fill()
368 mlog_errno(status); in ocfs2_block_group_fill()
399 if (status) in ocfs2_block_group_fill()
400 mlog_errno(status); in ocfs2_block_group_fill()
401 return status; in ocfs2_block_group_fill()
424 int status; in ocfs2_block_group_alloc_contig() local
430 status = ocfs2_claim_clusters(handle, ac, in ocfs2_block_group_alloc_contig()
433 if (status < 0) { in ocfs2_block_group_alloc_contig()
434 if (status != -ENOSPC) in ocfs2_block_group_alloc_contig()
435 mlog_errno(status); in ocfs2_block_group_alloc_contig()
446 status = -ENOMEM; in ocfs2_block_group_alloc_contig()
447 mlog_errno(status); in ocfs2_block_group_alloc_contig()
452 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_contig()
454 if (status < 0) { in ocfs2_block_group_alloc_contig()
456 mlog_errno(status); in ocfs2_block_group_alloc_contig()
460 return status ? ERR_PTR(status) : bg_bh; in ocfs2_block_group_alloc_contig()
469 int status = 0; in ocfs2_block_group_claim_bits() local
472 status = ocfs2_claim_clusters(handle, ac, min_bits, in ocfs2_block_group_claim_bits()
474 if (status != -ENOSPC) in ocfs2_block_group_claim_bits()
480 return status; in ocfs2_block_group_claim_bits()
490 int status; in ocfs2_block_group_grow_discontig() local
500 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_grow_discontig()
504 if (status < 0) { in ocfs2_block_group_grow_discontig()
505 mlog_errno(status); in ocfs2_block_group_grow_discontig()
513 status = ocfs2_block_group_claim_bits(osb, handle, ac, in ocfs2_block_group_grow_discontig()
516 if (status < 0) { in ocfs2_block_group_grow_discontig()
517 if (status != -ENOSPC) in ocfs2_block_group_grow_discontig()
518 mlog_errno(status); in ocfs2_block_group_grow_discontig()
535 status = -ENOSPC; in ocfs2_block_group_grow_discontig()
542 return status; in ocfs2_block_group_grow_discontig()
581 int status; in ocfs2_block_group_alloc_discontig() local
590 status = -ENOSPC; in ocfs2_block_group_alloc_discontig()
594 status = ocfs2_extend_trans(handle, in ocfs2_block_group_alloc_discontig()
596 if (status) { in ocfs2_block_group_alloc_discontig()
597 mlog_errno(status); in ocfs2_block_group_alloc_discontig()
610 status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits, in ocfs2_block_group_alloc_discontig()
612 if (status < 0) { in ocfs2_block_group_alloc_discontig()
613 if (status != -ENOSPC) in ocfs2_block_group_alloc_discontig()
614 mlog_errno(status); in ocfs2_block_group_alloc_discontig()
626 status = -ENOMEM; in ocfs2_block_group_alloc_discontig()
627 mlog_errno(status); in ocfs2_block_group_alloc_discontig()
632 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_discontig()
634 if (status < 0) { in ocfs2_block_group_alloc_discontig()
635 mlog_errno(status); in ocfs2_block_group_alloc_discontig()
639 status = ocfs2_block_group_grow_discontig(handle, alloc_inode, in ocfs2_block_group_alloc_discontig()
641 if (status) in ocfs2_block_group_alloc_discontig()
642 mlog_errno(status); in ocfs2_block_group_alloc_discontig()
645 if (status) in ocfs2_block_group_alloc_discontig()
647 return status ? ERR_PTR(status) : bg_bh; in ocfs2_block_group_alloc_discontig()
660 int status, credits; in ocfs2_block_group_alloc() local
672 status = ocfs2_reserve_clusters_with_limit(osb, in ocfs2_block_group_alloc()
675 if (status < 0) { in ocfs2_block_group_alloc()
676 if (status != -ENOSPC) in ocfs2_block_group_alloc()
677 mlog_errno(status); in ocfs2_block_group_alloc()
685 status = PTR_ERR(handle); in ocfs2_block_group_alloc()
687 mlog_errno(status); in ocfs2_block_group_alloc()
704 status = PTR_ERR(bg_bh); in ocfs2_block_group_alloc()
706 if (status != -ENOSPC) in ocfs2_block_group_alloc()
707 mlog_errno(status); in ocfs2_block_group_alloc()
712 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in ocfs2_block_group_alloc()
714 if (status < 0) { in ocfs2_block_group_alloc()
715 mlog_errno(status); in ocfs2_block_group_alloc()
744 status = 0; in ocfs2_block_group_alloc()
759 if (status) in ocfs2_block_group_alloc()
760 mlog_errno(status); in ocfs2_block_group_alloc()
761 return status; in ocfs2_block_group_alloc()
771 int status; in ocfs2_reserve_suballoc_bits() local
786 status = ocfs2_inode_lock(alloc_inode, &bh, 1); in ocfs2_reserve_suballoc_bits()
787 if (status < 0) { in ocfs2_reserve_suballoc_bits()
791 mlog_errno(status); in ocfs2_reserve_suballoc_bits()
792 return status; in ocfs2_reserve_suballoc_bits()
805 status = ocfs2_error(alloc_inode->i_sb, in ocfs2_reserve_suballoc_bits()
819 status = -ENOSPC; in ocfs2_reserve_suballoc_bits()
826 status = -ENOSPC; in ocfs2_reserve_suballoc_bits()
830 status = ocfs2_block_group_alloc(osb, alloc_inode, bh, in ocfs2_reserve_suballoc_bits()
833 if (status < 0) { in ocfs2_reserve_suballoc_bits()
834 if (status != -ENOSPC) in ocfs2_reserve_suballoc_bits()
835 mlog_errno(status); in ocfs2_reserve_suballoc_bits()
851 if (status) in ocfs2_reserve_suballoc_bits()
852 mlog_errno(status); in ocfs2_reserve_suballoc_bits()
853 return status; in ocfs2_reserve_suballoc_bits()
916 int i, status = -ENOSPC; in ocfs2_steal_resource() local
930 status = ocfs2_reserve_suballoc_bits(osb, ac, in ocfs2_steal_resource()
934 if (status >= 0) { in ocfs2_steal_resource()
942 return status; in ocfs2_steal_resource()
961 int status; in ocfs2_reserve_new_metadata_blocks() local
966 status = -ENOMEM; in ocfs2_reserve_new_metadata_blocks()
967 mlog_errno(status); in ocfs2_reserve_new_metadata_blocks()
980 status = ocfs2_reserve_suballoc_bits(osb, (*ac), in ocfs2_reserve_new_metadata_blocks()
986 if (status >= 0) { in ocfs2_reserve_new_metadata_blocks()
987 status = 0; in ocfs2_reserve_new_metadata_blocks()
991 } else if (status < 0 && status != -ENOSPC) { in ocfs2_reserve_new_metadata_blocks()
992 mlog_errno(status); in ocfs2_reserve_new_metadata_blocks()
999 status = ocfs2_steal_meta(osb, *ac); in ocfs2_reserve_new_metadata_blocks()
1001 if (status < 0) { in ocfs2_reserve_new_metadata_blocks()
1002 if (status != -ENOSPC) in ocfs2_reserve_new_metadata_blocks()
1003 mlog_errno(status); in ocfs2_reserve_new_metadata_blocks()
1007 status = 0; in ocfs2_reserve_new_metadata_blocks()
1009 if ((status < 0) && *ac) { in ocfs2_reserve_new_metadata_blocks()
1014 if (status) in ocfs2_reserve_new_metadata_blocks()
1015 mlog_errno(status); in ocfs2_reserve_new_metadata_blocks()
1016 return status; in ocfs2_reserve_new_metadata_blocks()
1031 int status; in ocfs2_reserve_new_inode() local
1037 status = -ENOMEM; in ocfs2_reserve_new_inode()
1038 mlog_errno(status); in ocfs2_reserve_new_inode()
1070 status = ocfs2_reserve_suballoc_bits(osb, *ac, in ocfs2_reserve_new_inode()
1076 if (status >= 0) { in ocfs2_reserve_new_inode()
1077 status = 0; in ocfs2_reserve_new_inode()
1092 } else if (status < 0 && status != -ENOSPC) { in ocfs2_reserve_new_inode()
1093 mlog_errno(status); in ocfs2_reserve_new_inode()
1100 status = ocfs2_steal_inode(osb, *ac); in ocfs2_reserve_new_inode()
1102 if (status < 0) { in ocfs2_reserve_new_inode()
1103 if (status != -ENOSPC) in ocfs2_reserve_new_inode()
1104 mlog_errno(status); in ocfs2_reserve_new_inode()
1108 status = 0; in ocfs2_reserve_new_inode()
1110 if ((status < 0) && *ac) { in ocfs2_reserve_new_inode()
1115 if (status) in ocfs2_reserve_new_inode()
1116 mlog_errno(status); in ocfs2_reserve_new_inode()
1117 return status; in ocfs2_reserve_new_inode()
1125 int status; in ocfs2_reserve_cluster_bitmap_bits() local
1130 status = ocfs2_reserve_suballoc_bits(osb, ac, in ocfs2_reserve_cluster_bitmap_bits()
1134 if (status < 0 && status != -ENOSPC) in ocfs2_reserve_cluster_bitmap_bits()
1135 mlog_errno(status); in ocfs2_reserve_cluster_bitmap_bits()
1137 return status; in ocfs2_reserve_cluster_bitmap_bits()
1148 int status, ret = 0; in ocfs2_reserve_clusters_with_limit() local
1153 status = -ENOMEM; in ocfs2_reserve_clusters_with_limit()
1154 mlog_errno(status); in ocfs2_reserve_clusters_with_limit()
1161 status = -ENOSPC; in ocfs2_reserve_clusters_with_limit()
1164 status = ocfs2_reserve_local_alloc_bits(osb, in ocfs2_reserve_clusters_with_limit()
1167 if ((status < 0) && (status != -ENOSPC)) { in ocfs2_reserve_clusters_with_limit()
1168 mlog_errno(status); in ocfs2_reserve_clusters_with_limit()
1173 if (status == -ENOSPC) { in ocfs2_reserve_clusters_with_limit()
1175 status = ocfs2_reserve_cluster_bitmap_bits(osb, *ac); in ocfs2_reserve_clusters_with_limit()
1177 if (status == -ENOSPC && !retried) { in ocfs2_reserve_clusters_with_limit()
1202 if (status < 0) { in ocfs2_reserve_clusters_with_limit()
1203 if (status != -ENOSPC) in ocfs2_reserve_clusters_with_limit()
1204 mlog_errno(status); in ocfs2_reserve_clusters_with_limit()
1209 status = 0; in ocfs2_reserve_clusters_with_limit()
1211 if ((status < 0) && *ac) { in ocfs2_reserve_clusters_with_limit()
1216 if (status) in ocfs2_reserve_clusters_with_limit()
1217 mlog_errno(status); in ocfs2_reserve_clusters_with_limit()
1218 return status; in ocfs2_reserve_clusters_with_limit()
1282 int offset, start, found, status = 0; in ocfs2_block_group_find_clear_bits() local
1326 status = -ENOSPC; in ocfs2_block_group_find_clear_bits()
1331 return status; in ocfs2_block_group_find_clear_bits()
1341 int status; in ocfs2_block_group_set_bits() local
1355 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_set_bits()
1359 if (status < 0) { in ocfs2_block_group_set_bits()
1360 mlog_errno(status); in ocfs2_block_group_set_bits()
1378 return status; in ocfs2_block_group_set_bits()
1407 int status; in ocfs2_relink_block_group() local
1428 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1431 if (status < 0) in ocfs2_relink_block_group()
1437 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1439 if (status < 0) in ocfs2_relink_block_group()
1445 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1447 if (status < 0) in ocfs2_relink_block_group()
1454 if (status < 0) in ocfs2_relink_block_group()
1455 mlog_errno(status); in ocfs2_relink_block_group()
1456 return status; in ocfs2_relink_block_group()
1741 int status; in ocfs2_search_chain() local
1756 status = ocfs2_read_group_descriptor(alloc_inode, fe, in ocfs2_search_chain()
1759 if (status < 0) { in ocfs2_search_chain()
1760 mlog_errno(status); in ocfs2_search_chain()
1765 status = -ENOSPC; in ocfs2_search_chain()
1768 while ((status = ac->ac_group_search(alloc_inode, group_bh, in ocfs2_search_chain()
1781 status = ocfs2_read_group_descriptor(alloc_inode, fe, in ocfs2_search_chain()
1783 if (status < 0) { in ocfs2_search_chain()
1784 mlog_errno(status); in ocfs2_search_chain()
1789 if (status < 0) { in ocfs2_search_chain()
1790 if (status != -ENOSPC) in ocfs2_search_chain()
1791 mlog_errno(status); in ocfs2_search_chain()
1801 if (!status) in ocfs2_search_chain()
1826 status = ocfs2_relink_block_group(handle, alloc_inode, in ocfs2_search_chain()
1829 if (status < 0) { in ocfs2_search_chain()
1830 mlog_errno(status); in ocfs2_search_chain()
1838 status = ocfs2_alloc_dinode_update_counts(alloc_inode, handle, in ocfs2_search_chain()
1841 if (status) { in ocfs2_search_chain()
1842 mlog_errno(status); in ocfs2_search_chain()
1846 status = ocfs2_block_group_set_bits(handle, in ocfs2_search_chain()
1852 if (status < 0) { in ocfs2_search_chain()
1855 mlog_errno(status); in ocfs2_search_chain()
1869 if (status) in ocfs2_search_chain()
1870 mlog_errno(status); in ocfs2_search_chain()
1871 return status; in ocfs2_search_chain()
1881 int status; in ocfs2_claim_suballoc_bits() local
1900 status = ocfs2_error(ac->ac_inode->i_sb, in ocfs2_claim_suballoc_bits()
1914 status = ocfs2_search_one_group(ac, handle, bits_wanted, in ocfs2_claim_suballoc_bits()
1916 if (!status) in ocfs2_claim_suballoc_bits()
1918 if (status < 0 && status != -ENOSPC) { in ocfs2_claim_suballoc_bits()
1919 mlog_errno(status); in ocfs2_claim_suballoc_bits()
1929 status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, in ocfs2_claim_suballoc_bits()
1931 if (!status) { in ocfs2_claim_suballoc_bits()
1938 if (status < 0 && status != -ENOSPC) { in ocfs2_claim_suballoc_bits()
1939 mlog_errno(status); in ocfs2_claim_suballoc_bits()
1957 status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, in ocfs2_claim_suballoc_bits()
1959 if (!status) { in ocfs2_claim_suballoc_bits()
1963 if (status < 0 && status != -ENOSPC) { in ocfs2_claim_suballoc_bits()
1964 mlog_errno(status); in ocfs2_claim_suballoc_bits()
1970 if (status != -ENOSPC) { in ocfs2_claim_suballoc_bits()
1981 if (status) in ocfs2_claim_suballoc_bits()
1982 mlog_errno(status); in ocfs2_claim_suballoc_bits()
1983 return status; in ocfs2_claim_suballoc_bits()
1994 int status; in ocfs2_claim_metadata() local
2001 status = ocfs2_claim_suballoc_bits(ac, in ocfs2_claim_metadata()
2006 if (status < 0) { in ocfs2_claim_metadata()
2007 mlog_errno(status); in ocfs2_claim_metadata()
2017 status = 0; in ocfs2_claim_metadata()
2019 if (status) in ocfs2_claim_metadata()
2020 mlog_errno(status); in ocfs2_claim_metadata()
2021 return status; in ocfs2_claim_metadata()
2199 int status; in ocfs2_claim_new_inode() local
2209 status = ocfs2_claim_suballoc_bits(ac, in ocfs2_claim_new_inode()
2214 if (status < 0) { in ocfs2_claim_new_inode()
2215 mlog_errno(status); in ocfs2_claim_new_inode()
2227 status = 0; in ocfs2_claim_new_inode()
2229 if (status) in ocfs2_claim_new_inode()
2230 mlog_errno(status); in ocfs2_claim_new_inode()
2231 return status; in ocfs2_claim_new_inode()
2302 int status; in __ocfs2_claim_clusters() local
2315 status = ocfs2_claim_local_alloc_bits(osb, in __ocfs2_claim_clusters()
2321 if (!status) in __ocfs2_claim_clusters()
2330 status = -ENOSPC; in __ocfs2_claim_clusters()
2337 status = ocfs2_claim_suballoc_bits(ac, in __ocfs2_claim_clusters()
2342 if (!status) { in __ocfs2_claim_clusters()
2352 if (status < 0) { in __ocfs2_claim_clusters()
2353 if (status != -ENOSPC) in __ocfs2_claim_clusters()
2354 mlog_errno(status); in __ocfs2_claim_clusters()
2361 if (status) in __ocfs2_claim_clusters()
2362 mlog_errno(status); in __ocfs2_claim_clusters()
2363 return status; in __ocfs2_claim_clusters()
2387 int status; in ocfs2_block_group_clear_bits() local
2398 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_block_group_clear_bits()
2403 if (status < 0) { in ocfs2_block_group_clear_bits()
2404 mlog_errno(status); in ocfs2_block_group_clear_bits()
2439 return status; in ocfs2_block_group_clear_bits()
2454 int status = 0; in _ocfs2_free_suballoc_bits() local
2474 status = ocfs2_read_group_descriptor(alloc_inode, fe, bg_blkno, in _ocfs2_free_suballoc_bits()
2476 if (status < 0) { in _ocfs2_free_suballoc_bits()
2477 mlog_errno(status); in _ocfs2_free_suballoc_bits()
2484 status = ocfs2_block_group_clear_bits(handle, alloc_inode, in _ocfs2_free_suballoc_bits()
2487 if (status < 0) { in _ocfs2_free_suballoc_bits()
2488 mlog_errno(status); in _ocfs2_free_suballoc_bits()
2492 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in _ocfs2_free_suballoc_bits()
2494 if (status < 0) { in _ocfs2_free_suballoc_bits()
2495 mlog_errno(status); in _ocfs2_free_suballoc_bits()
2510 if (status) in _ocfs2_free_suballoc_bits()
2511 mlog_errno(status); in _ocfs2_free_suballoc_bits()
2512 return status; in _ocfs2_free_suballoc_bits()
2549 int status; in _ocfs2_free_clusters() local
2570 status = _ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh, in _ocfs2_free_clusters()
2573 if (status < 0) { in _ocfs2_free_clusters()
2574 mlog_errno(status); in _ocfs2_free_clusters()
2582 if (status) in _ocfs2_free_clusters()
2583 mlog_errno(status); in _ocfs2_free_clusters()
2584 return status; in _ocfs2_free_clusters()
2702 int status; in ocfs2_get_suballoc_slot_bit() local
2709 status = ocfs2_read_blocks_sync(osb, blkno, 1, &inode_bh); in ocfs2_get_suballoc_slot_bit()
2710 if (status < 0) { in ocfs2_get_suballoc_slot_bit()
2712 (unsigned long long)blkno, status); in ocfs2_get_suballoc_slot_bit()
2720 status = -EINVAL; in ocfs2_get_suballoc_slot_bit()
2729 status = -EINVAL; in ocfs2_get_suballoc_slot_bit()
2743 if (status) in ocfs2_get_suballoc_slot_bit()
2744 mlog_errno(status); in ocfs2_get_suballoc_slot_bit()
2745 return status; in ocfs2_get_suballoc_slot_bit()
2765 int status; in ocfs2_test_suballoc_bit() local
2775 status = -EINVAL; in ocfs2_test_suballoc_bit()
2781 status = ocfs2_read_group_descriptor(suballoc, alloc_di, bg_blkno, in ocfs2_test_suballoc_bit()
2783 if (status < 0) { in ocfs2_test_suballoc_bit()
2785 (unsigned long long)bg_blkno, status); in ocfs2_test_suballoc_bit()
2795 if (status) in ocfs2_test_suballoc_bit()
2796 mlog_errno(status); in ocfs2_test_suballoc_bit()
2797 return status; in ocfs2_test_suballoc_bit()
2815 int status; in ocfs2_test_inode_bit() local
2823 status = ocfs2_get_suballoc_slot_bit(osb, blkno, &suballoc_slot, in ocfs2_test_inode_bit()
2825 if (status < 0) { in ocfs2_test_inode_bit()
2826 mlog(ML_ERROR, "get alloc slot and bit failed %d\n", status); in ocfs2_test_inode_bit()
2836 status = -EINVAL; in ocfs2_test_inode_bit()
2843 status = ocfs2_inode_lock(inode_alloc_inode, &alloc_bh, 0); in ocfs2_test_inode_bit()
2844 if (status < 0) { in ocfs2_test_inode_bit()
2848 (u32)suballoc_slot, status); in ocfs2_test_inode_bit()
2852 status = ocfs2_test_suballoc_bit(osb, inode_alloc_inode, alloc_bh, in ocfs2_test_inode_bit()
2854 if (status < 0) in ocfs2_test_inode_bit()
2855 mlog(ML_ERROR, "test suballoc bit failed %d\n", status); in ocfs2_test_inode_bit()
2863 if (status) in ocfs2_test_inode_bit()
2864 mlog_errno(status); in ocfs2_test_inode_bit()
2865 return status; in ocfs2_test_inode_bit()