kernel-hacking-2024-linux-s.../fs/ext4
Valerie Clement 74d3487fc8 ext4: modify block allocation algorithm for the last group
When a directory inode is allocated in the last group and the last group
contains less than s_blocks_per_group blocks, the initial block allocated
for the directory is not always allocated in the same group as the
directory inode, but in one of the first groups of the filesystem (group 1
for example).
Depending on the current process's pid, ext4_find_near() and 
ext4_ext_find_goal() can return a block number greater than the maximum
blocks count in the filesystem and in that case the block will be not
allocated in the same group as the inode.

The following patch fixes the problem.

Should the modification also be done in ext2/3 code?

Signed-off-by: Valerie Clement <valerie.clement@bull.net>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2008-02-15 13:43:07 -05:00
..
acl.c
acl.h
balloc.c ext[234]: cleanup ext[234]_bg_num_gdb() 2008-02-06 10:41:21 -08:00
bitmap.c
dir.c Remove incorrect BKL comments in ext4 2008-02-25 17:20:46 -05:00
ext4_jbd2.c
extents.c ext4: modify block allocation algorithm for the last group 2008-02-15 13:43:07 -05:00
file.c ext4: store maxbytes for bitmapped files and return EFBIG as appropriate 2008-01-28 23:58:27 -05:00
fsync.c
group.h ext4: add ext4_group_t, and change all group variables to this type. 2008-01-28 23:58:27 -05:00
hash.c
ialloc.c iget: stop EXT4 from using iget() and read_inode() 2008-02-07 08:42:27 -08:00
inode.c ext4: modify block allocation algorithm for the last group 2008-02-15 13:43:07 -05:00
ioctl.c ext4: Add EXT4_IOC_MIGRATE ioctl 2008-01-28 23:58:26 -05:00
Makefile ext4: Add multi block allocator for ext4 2008-01-29 00:19:52 -05:00
mballoc.c ext4: Fix kernel BUG at fs/ext4/mballoc.c:910! 2008-02-15 13:48:51 -05:00
migrate.c ext4: Fix memory and buffer head leak in callers to ext4_ext_find_extent() 2008-02-25 16:54:37 -05:00
namei.c ext4: Don't leave behind a half-created inode if ext4_mkdir() fails 2008-02-22 06:17:31 -05:00
namei.h
resize.c iget: stop EXT4 from using iget() and read_inode() 2008-02-07 08:42:27 -08:00
super.c Introduce path_put() 2008-02-14 21:13:33 -08:00
symlink.c
xattr.c ext4: Add multi block allocator for ext4 2008-01-29 00:19:52 -05:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c