Changeset 35f48f2 in mainline for uspace/lib/ext4/libext4_bitmap.c


Ignore:
Timestamp:
2011-11-09T08:48:06Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
Children:
1e65444
Parents:
0f09d4ea
Message:

succesful writing (only for direct block)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_bitmap.c

    r0f09d4ea r35f48f2  
    167167        rc = ext4_bitmap_find_free_bit_and_set(block->data, &rel_block_idx, block_size);
    168168
    169         // if ENOSPC - try next block group - try next block groups
    170169
     170        if (rc != EOK) {
     171                EXT4FS_DBG("no block found");
     172                // TODO if ENOSPC - try next block group - try next block groups
     173        }
    171174
     175        // TODO decrement superblock free blocks count
     176        //uint32_t sb_free_blocks = ext4_superblock_get_free_blocks_count(sb);
     177        //sb_free_blocks--;
     178        //ext4_superblock_set_free_blocks_count(sb, sb_free_blocks);
    172179
    173 
    174         // TODO decrement superblock & block group free blocks count
     180        uint32_t bg_free_blocks = ext4_block_group_get_free_blocks_count(bg_ref->block_group);
     181        bg_free_blocks++;
     182        ext4_block_group_set_free_blocks_count(bg_ref->block_group, bg_free_blocks);
     183        bg_ref->dirty = true;
    175184
    176185        // return
Note: See TracChangeset for help on using the changeset viewer.