Changeset ff381a7 in mainline for uspace/lib/ext4/libext4_ialloc.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3feeab2 rff381a7  
    195195                uint32_t used_dirs = ext4_block_group_get_used_dirs_count(bg, sb);
    196196               
    197                 /* Check if this block group is good candidate for allocation */
    198                 if ((free_inodes >= avg_free_inodes) && (free_blocks > 0)) {
     197                /*
     198                 * Check if this block group is a good candidate
     199                 * for allocation.
     200                 *
     201                 * The criterion is based on the average number
     202                 * of free inodes, unless we examine the last block
     203                 * group. In that case the last block group might
     204                 * have less than the average number of free inodes,
     205                 * but it still needs to be taken as a candidate
     206                 * because the previous block groups have zero free
     207                 * blocks.
     208                 */
     209                if (((free_inodes >= avg_free_inodes) || (bgid == bg_count - 1)) &&
     210                    (free_blocks > 0)) {
    199211                        /* Load block with bitmap */
    200212                        uint32_t bitmap_block_addr = ext4_block_group_get_inode_bitmap(
Note: See TracChangeset for help on using the changeset viewer.