Lines Matching refs:err
453 int err = 0;
469 err = hfs_count_allocated (hfsmp, startblk, blks, &alloccount);
471 if (err == 0 && alloccount != 0) {
509 int err = 0;
528 err = EINVAL;
531 if (err == 0) {
532 err = journal_trim_add_extent(hfsmp->jnl, offset, length);
533 if (err) {
534 printf("hfs_unmap_free_extent: error %d from journal_trim_add_extent", err);
540 KERNEL_DEBUG_CONSTANT(HFSDBG_UNMAP_FREE | DBG_FUNC_END, err, 0, 0, 0, 0);
649 int err;
658 err = journal_trim_remove_extent(hfsmp->jnl, offset, length);
659 if (err) {
660 printf("hfs_unmap_alloc_extent: error %d from journal_trim_remove_extent", err);
665 KERNEL_DEBUG_CONSTANT(HFSDBG_UNMAP_ALLOC | DBG_FUNC_END, err, 0, 0, 0, 0);
827 OSErr err;
885 err = dskFulErr;
889 err = dskFulErr;
932 err = BlockAllocateContig(vcb, startingBlock, minBlocks, maxBlocks,
941 if ((err == noErr) &&
956 err = BlockAllocateAny(vcb, startingBlock, vcb->allocLimit,
967 if (err == noErr || err == dskFulErr) {
999 err = BlockAllocateKnown(vcb, maxBlocks, actualStartBlock, actualNumBlocks);
1002 if (err == dskFulErr) {
1007 err = BlockAllocateAny(vcb, startingBlock, vcb->allocLimit,
1011 if (err == dskFulErr) {
1016 err = BlockAllocateAny(vcb, 1, startingBlock, maxBlocks,
1074 if (err == noErr) {
1093 KERNEL_DEBUG_CONSTANT(HFSDBG_BLOCK_ALLOCATE | DBG_FUNC_END, err, *actualStartBlock, *actualNumBlocks, 0, 0);
1095 return err;
1126 OSErr err;
1137 err = noErr;
1175 err = BlockMarkFreeRBTree(vcb, firstBlock, numBlocks);
1179 err = BlockMarkFreeInternal(vcb, firstBlock, numBlocks, true);
1183 err = BlockMarkFreeInternal(vcb, firstBlock, numBlocks, true);
1185 if (err)
1233 KERNEL_DEBUG_CONSTANT(HFSDBG_BLOCK_DEALLOCATE | DBG_FUNC_END, err, 0, 0, 0, 0);
1235 return err;
1344 OSErr err;
1369 err = (int)buf_meta_bread(vp, block, blockSize, NOCRED, &bp);
1372 if (err) {
1383 KERNEL_DEBUG_CONSTANT(HFSDBG_READ_BITMAP_BLOCK | DBG_FUNC_END, err, 0, 0, 0, 0);
1385 return err;
1521 OSErr err;
1540 err = BlockFindContiguous(vcb, startingBlock, vcb->allocLimit, minBlocks,
1542 if (err == dskFulErr && startingBlock != 0) {
1547 err = BlockFindContiguous(vcb, 1, startingBlock, minBlocks, maxBlocks,
1553 if (err == noErr)
1554 err = BlockMarkAllocatedInternal(vcb, *actualStartBlock, *actualNumBlocks);
1557 KERNEL_DEBUG_CONSTANT(HFSDBG_ALLOC_CONTIG_BITMAP | DBG_FUNC_END, err, *actualStartBlock, *actualNumBlocks, 0, 0);
1559 return err;
1583 OSErr err;
1631 err = BlockMarkAllocatedRBTree(vcb, *actualStartBlock, *actualNumBlocks);
1632 if (err == noErr) {
1643 return err;
1724 err = BlockMarkAllocatedRBTree(vcb, *actualStartBlock, *actualNumBlocks);
1726 if (err == noErr) {
1762 err = dskFulErr;
1765 if (err == noErr) {
1776 return err;
1846 OSErr err;
1852 err = BlockAllocateContigRBTree(vcb, startingBlock, 1, maxBlocks, useMetaZone,
1854 return err;
1874 OSErr err;
1902 err = dskFulErr;
1916 err = ReadBitmapBlock(vcb, startingBlock, &currCache, &blockRef);
1917 if (err != noErr) goto Exit;
1955 err = ReleaseBitmapBlock(vcb, blockRef, false);
1956 if (err != noErr) goto Exit;
1965 err = dskFulErr;
1969 err = ReadBitmapBlock(vcb, block, &currCache, &blockRef);
1970 if (err != noErr) goto Exit;
1982 err = dskFulErr;
2027 err = ReleaseBitmapBlock(vcb, blockRef, true);
2028 if (err != noErr) goto Exit;
2042 err = ReadBitmapBlock(vcb, block, &currCache, &blockRef);
2043 if (err != noErr) goto Exit;
2060 if (err == noErr) {
2090 KERNEL_DEBUG_CONSTANT(HFSDBG_ALLOC_ANY_BITMAP | DBG_FUNC_END, err, *actualStartBlock, *actualNumBlocks, 0, 0);
2092 return err;
2123 OSErr err;
2163 err = EIO;
2170 err = BlockMarkAllocatedInternal(vcb, *actualStartBlock, *actualNumBlocks);
2176 KERNEL_DEBUG_CONSTANT(HFSDBG_ALLOC_KNOWN_BITMAP | DBG_FUNC_END, err, *actualStartBlock, *actualNumBlocks, 0, 0);
2178 return err;
2201 int err;
2212 err = BlockMarkAllocatedRBTree(vcb, startingBlock, numBlocks);
2213 if (err == noErr) {
2223 return err;
2260 OSErr err;
2282 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2283 if (err != noErr) goto Exit;
2340 err = ReleaseBitmapBlock(vcb, blockRef, true);
2341 if (err != noErr) goto Exit;
2343 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2344 if (err != noErr) goto Exit;
2378 err = ReleaseBitmapBlock(vcb, blockRef, true);
2379 if (err != noErr) goto Exit;
2381 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2382 if (err != noErr) goto Exit;
2409 KERNEL_DEBUG_CONSTANT(HFSDBG_MARK_ALLOC_BITMAP | DBG_FUNC_END, err, 0, 0, 0, 0);
2411 return err;
2429 OSErr err;
2443 err = BlockMarkAllocatedInternal (vcb, startingBlock, numBlocks);
2445 if (err == noErr) {
2505 return err;
2529 int err;
2540 err = BlockMarkFreeRBTree(vcb, startingBlock, numBlocks);
2541 if (err == noErr) {
2551 return err;
2674 OSErr err;
2707 err = EIO;
2715 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2716 if (err != noErr) goto Exit;
2789 err = ReleaseBitmapBlock(vcb, blockRef, true);
2790 if (err != noErr) goto Exit;
2792 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2793 if (err != noErr) goto Exit;
2826 err = ReleaseBitmapBlock(vcb, blockRef, true);
2827 if (err != noErr) goto Exit;
2829 err = ReadBitmapBlock(vcb, startingBlock, &buffer, &blockRef);
2830 if (err != noErr) goto Exit;
2879 if (err == noErr) {
2884 KERNEL_DEBUG_CONSTANT(HFSDBG_MARK_FREE_BITMAP | DBG_FUNC_END, err, 0, 0, 0, 0);
2886 return err;
2894 err = EIO;
2915 OSErr err;
2928 err = BlockMarkFreeInternal(vcb, startingBlock, numBlocks, true);
2930 if (err == noErr) {
2998 return err;
3043 OSErr err;
3096 err = ReadBitmapBlock(vcb, currentBlock, &buffer, &blockRef);
3097 if ( err != noErr ) goto ErrorExit;
3148 err = ReleaseBitmapBlock(vcb, blockRef, false);
3149 if (err != noErr) goto ErrorExit;
3161 err = ReadBitmapBlock(vcb, currentBlock, &buffer, &blockRef);
3162 if ( err != noErr ) goto ErrorExit;
3234 err = ReleaseBitmapBlock(vcb, blockRef, false);
3235 if (err != noErr) goto ErrorExit;
3249 err = ReadBitmapBlock(vcb, currentBlock, &buffer, &blockRef);
3250 if ( err != noErr ) goto ErrorExit;
3306 err = dskFulErr;
3313 err = noErr;
3353 KERNEL_DEBUG_CONSTANT(HFSDBG_BLOCK_FIND_CONTIG | DBG_FUNC_END, err, *actualStartBlock, *actualNumBlocks, 0, 0);
3355 return err;