linux/fs/ext4
Tao Ma 0ba0851714 ext4: fix a BUG in mb_mark_used during trim.
In a bs=4096 volume, if we call FITRIM with the following parameter as
fstrim_range(start = 102400, len = 134144000, minlen = 10240),
we will trigger this BUG_ON:

	BUG_ON(start + len > (e4b->bd_sb->s_blocksize << 3));

Mar  4 00:55:52 boyu-tm kernel: ------------[ cut here ]------------
Mar  4 00:55:52 boyu-tm kernel: kernel BUG at fs/ext4/mballoc.c:1506!
Mar  4 01:21:09 boyu-tm kernel: Code: d4 00 00 00 00 49 89 fe 8b 56 0c 44 8b 7e 04 89 55 c4 48 8b 4f 28 89 d6 44 01 fe 48 63 d6 48 8b 41 18 48 c1 e0 03 48 39 c2 76 04 <0f> 0b eb fe 48 8b 55 b0 8b 47 34 3b 42 08 74 04 0f 0b eb fe 48
Mar  4 01:21:09 boyu-tm kernel: RIP  [<ffffffffa053eb42>] mb_mark_used+0x47/0x26c [ext4]
Mar  4 01:21:09 boyu-tm kernel:  RSP <ffff880121e45c38>
Mar  4 01:21:09 boyu-tm kernel: ---[ end trace 9f461696f6a9dcf2 ]---

Fix this bug by doing the accounting correctly.

Cc: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2011-03-23 15:48:11 -04:00
..
acl.c
acl.h
balloc.c ext4: add more tracepoints and use dev_t in the trace buffer 2011-03-21 21:38:05 -04:00
bitmap.c
block_validity.c
dir.c
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h ext4: unify the ext4_handle_release_buffer() api 2011-03-20 22:57:02 -04:00
ext4.h ext4: serialize unaligned asynchronous DIO 2011-02-12 08:17:34 -05:00
extents.c ext4: unused variables cleanup in fs/ext4/extents.c 2011-03-23 14:08:27 -04:00
file.c ext4: serialize unaligned asynchronous DIO 2011-02-12 08:17:34 -05:00
fsync.c ext4: add more tracepoints and use dev_t in the trace buffer 2011-03-21 21:38:05 -04:00
hash.c
ialloc.c ext4: add more tracepoints and use dev_t in the trace buffer 2011-03-21 21:38:05 -04:00
inode.c ext4: remove redundant set_buffer_mapped() in ext4_da_get_block_prep() 2011-03-23 14:05:03 -04:00
ioctl.c ext4: add FITRIM to compat_ioctl. 2011-03-20 23:16:58 -04:00
Kconfig
Makefile
mballoc.c ext4: fix a BUG in mb_mark_used during trim. 2011-03-23 15:48:11 -04:00
mballoc.h ext4: clarify description of ac_g_ex in struct ext4_allocation_context 2011-02-24 14:10:00 -05:00
migrate.c ext4: Fix sparse warning: Using plain integer as NULL pointer 2011-02-21 21:01:42 -05:00
move_extent.c
namei.c ext4: add more tracepoints and use dev_t in the trace buffer 2011-03-21 21:38:05 -04:00
page-io.c ext4: optimize ext4_bio_write_page() when no extent conversion is needed 2011-02-28 13:12:38 -05:00
resize.c ext4: unify the ext4_handle_release_buffer() api 2011-03-20 22:57:02 -04:00
super.c ext4: add missing space in printk's in __ext4_grp_locked_error() 2011-03-21 20:39:22 -04:00
symlink.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: unify the ext4_handle_release_buffer() api 2011-03-20 22:57:02 -04:00
xattr.h