aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fcntl.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2008-08-19 22:19:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-08-19 22:19:50 -0400
commitc001077f4003fa75793bb62979baa6241dd8eb19 (patch)
tree74d37ab68e3cfe514b8a46bd8324ba713bdc605f /fs/fcntl.c
parent37609fd5ae62db75026d9f53096a1fbc35e040d9 (diff)
ext4: Fix bug where we return ENOSPC even though we have plenty of inodes
The find_group_flex() function starts with best_flex as the parent_fbg_group, which happens to have 0 inodes free. Some of the flex groups searched have free blocks and free inodes, but the flex_freeb_ratio is < 10, so they're skipped. Then when a group is compared to the current "best" flex group, it does not have more free blocks than "best", so it is skipped as well. This continues until no flex group with free inodes is found which has a proper ratio or which has more free blocks than the "best" group, and we're left with a "best" group that has 0 inodes free, and we return -ENOSPC. We fix this by changing the logic so that if the current "best" flex group has no inodes free, and the current one does have room, it is promoted to the next "best." Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/fcntl.c')
0 files changed, 0 insertions, 0 deletions