[Lucid] SRU: Lucid kernel is missing a large number of important ext4 bug fixes

Brad Figg brad.figg at canonical.com
Tue Jun 22 20:54:38 UTC 2010


On 06/22/2010 01:42 PM, Brad Figg wrote:
> BugLink: http://bugs.launchpad.net/bugs/5088069
>
> SRU Justification
>
> Impact:
> The following patches are heading to the stable maintainers tree and will eventually get pulled into
>    the
> Lucid tree. The earlier we can get these in the fewer issues our users will encounter. We will be getting
> these through stable-tree updates, we would just be pulling them in a little earlier.
>
> The following patches should really be applied to the Lucid 2.6.32-22.33 kernel:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/tytso/ext4-patches/ext4-patches-for-2.6.32.11--14.tar.gz
>
> There is a git tree you may find useful here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git lucid-2.6.32-ext4
>
> It fixes a very large number of ext4 bugs, including (but not limited to):
>
> http://bugzilla.kernel.org/show_bug.cgi?id=14286
> http://bugzilla.kernel.org/show_bug.cgi?id=14936
> http://bugzilla.kernel.org/show_bug.cgi?id=15420
> http://bugzilla.kernel.org/show_bug.cgi?id=15579
> http://bugzilla.kernel.org/show_bug.cgi?id=13549
> http://bugzilla.kernel.org/show_bug.cgi?id=15742
> http://bugzilla.kernel.org/show_bug.cgi?id=15768
> http://bugzilla.kernel.org/show_bug.cgi?id=15792
> http://bugzilla.kernel.org/show_bug.cgi?id=15827
>
> This patch has been submitted upstream, but I'm not sure if Greg K-H will be doing another 2.6.32.y kernel release.
>
> Testing:
>      TBD
>
>
> The following changes since commit 59152141a98f95f71e8dcc505c226ceaf1c3abc7:
>     Yin Kangkai (1):
>           jbd: jbd-debug and jbd2-debug should be writable
>
> are available in the git repository at:
>
>     git://kernel.ubuntu.com/bradf/ubuntu-lucid lp588069
>
> Akira Fujita (3):
>         ext4: Fix insertion point of extent in mext_insert_across_blocks()
>         ext4: Fix the NULL reference in double_down_write_data_sem()
>         ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl
>
> Aneesh Kumar K.V (4):
>         ext4: Ensure zeroout blocks have no dirty metadata
>         ext4: Handle -EDQUOT error on write
>         ext4: Fix quota accounting error with fallocate
>         ext4: Drop EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE flag
>
> Ben Hutchings (2):
>         ext4: Conditionally define compat ioctl numbers
>         ext4: Fix compat EXT4_IOC_ADD_GROUP
>
> Christian Borntraeger (1):
>         ext4: allow defrag (EXT4_IOC_MOVE_EXT) in 32bit compat mode
>
> Curt Wohlgemuth (5):
>         ext4: Fix BUG_ON at fs/buffer.c:652 in no journal mode
>         ext4: Fix possible lost inode write in no journal mode
>         ext4: Fix buffer head leaks after calls to ext4_get_inode_loc()
>         ext4: Remove extraneous newlines in ext4_msg() calls
>         ext4: check for a good block group before loading buddy pages
>
> Dmitry Monakhov (10):
>         ext4: fix error handling in migrate
>         ext4: explicitly remove inode from orphan list after failed direct io
>         ext4: Handle non empty on-disk orphan link
>         ext4: check missed return value in ext4_sync_file()
>         ext4: fix quota accounting in case of fallocate
>         ext4: Do not zero out uninitialized extents beyond i_size
>         ext4: clean up inode bitmaps manipulation in ext4_free_inode
>         ext4: init statistics after journal recovery
>         ext4: Use bitops to read/modify i_flags in struct ext4_inode_info
>         ext4: restart ext4_ext_remove_space() after transaction restart
>
> Eric Sandeen (5):
>         ext4: Fixed inode allocator to correctly track a flex_bg's used_dirs
>         ext4: check s_log_groups_per_flex in online resize code
>         ext4: don't return to userspace after freezing the fs with a mutex held
>         ext4: stop issuing discards if not supported by device
>         ext4: don't scan/accumulate more pages than mballoc will allocate
>
> Frank Mayhar (1):
>         ext4: Make fsync sync new parent directories in no-journal mode
>
> Jan Kara (2):
>         ext4: Fix estimate of # of blocks needed to write indirect-mapped files
>         ext4: Show journal_checksum option
>
> Jiaying Zhang (1):
>         ext4: Add flag to files with blocks intentionally past EOF
>
> Jing Zhang (3):
>         ext4: fix memory leaks in error path handling of ext4_ext_zeroout()
>         ext4: Remove unnecessary call to ext4_get_group_desc() in mballoc
>         ext4: rename ext4_mb_release_desc() to ext4_mb_unload_buddy()
>
> Julia Lawall (1):
>         ext4: Eliminate potential double free on error path
>
> Nikanth Karthikesan (1):
>         ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate
>
> Richard Kennedy (1):
>         ext4: return correct wbc.nr_to_write in ext4_da_writepages
>
> Surbhi Palande (1):
>         ext4: replace BUG() with return -EIO in ext4_ext_get_blocks
>
> Tao Ma (1):
>         ext4: Fix fencepost error in chosing choosing group vs file preallocation.
>
> Theodore Ts'o (8):
>         ext4, jbd2: Add barriers for file systems with exernal journals
>         ext4: Patch up how we claim metadata blocks for quota purposes
>         ext4: Fix accounting of reserved metadata blocks
>         ext4: Calculate metadata requirements more accurately
>         ext4: Use bitops to read/modify EXT4_I(inode)->i_state
>         ext4: Issue the discard operation *before* releasing the blocks to be reused
>         ext4: Avoid crashing on NULL ptr dereference on a filesystem error
>         ext4: Clear the EXT4_EOFBLOCKS_FL flag only when warranted
>
> Toshiyuki Okajima (1):
>         ext4: make "offset" consistent in ext4_check_dir_entry()
>
>    fs/ext4/dir.c          |   12 +-
>    fs/ext4/ext4.h         |  157 ++++++++++++++++++---
>    fs/ext4/ext4_extents.h |    3 +-
>    fs/ext4/ext4_jbd2.c    |    2 +-
>    fs/ext4/ext4_jbd2.h    |    6 +-
>    fs/ext4/extents.c      |  251 ++++++++++++++++++++++++++--------
>    fs/ext4/file.c         |    6 +-
>    fs/ext4/fsync.c        |   49 ++++++-
>    fs/ext4/ialloc.c       |   98 ++++++-------
>    fs/ext4/inode.c        |  365 ++++++++++++++++++++++++++++--------------------
>    fs/ext4/ioctl.c        |   37 +++++-
>    fs/ext4/mballoc.c      |  132 ++++++++++++------
>    fs/ext4/migrate.c      |   37 +++---
>    fs/ext4/move_extent.c  |   28 ++--
>    fs/ext4/namei.c        |   24 +++-
>    fs/ext4/resize.c       |    3 +-
>    fs/ext4/super.c        |   67 +++++-----
>    fs/ext4/xattr.c        |   28 ++--
>    fs/jbd2/checkpoint.c   |   15 ++
>    fs/jbd2/commit.c       |   19 ++-
>    include/linux/jbd2.h   |    1 +
>    21 files changed, 905 insertions(+), 435 deletions(-)
>

Here is my review of these patches (for what its worth).

commit 7c4cab0f51914ebc1bc1e4d66deb7d277b3bcc56
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: Fix potential quota deadlock

# Type: Fix "potential" deadlock. No bug id.
Small amount of code involved. Looks good.

commit 436daf9c07308ab82a2d7b1ca5e5421a5af70886
Author: Yin Kangkai <kangkai.yin at intel.com>

     jbd: jbd-debug and jbd2-debug should be writable

# Type: Bug fix, no bug id.
Small amount of code, just adding a write flag. Looks good.

commit 7ff2fe41e8e2d2e2634ffc89343ba8d1c639d98d
Author: Surbhi Palande <surbhi.palande at canonical.com>

     ext4: replace BUG() with return -EIO in ext4_ext_get_blocks

# Type: Bug fix, with bug id.
Small amount of code, returning an error id. Looks good.

commit debd0c31e46a3836b1d8e7cdd5b4397fb777dbec
Author: Theodore Ts'o <tytso at mit.edu>

     ext4, jbd2: Add barriers for file systems with exernal journals

# Type: Bug fix, no bug id.
Small amount of code. Looks good.

commit e398c494e96fcbf92f45b907e4e3598da525542f
Author: Julia Lawall <julia at diku.dk>

     ext4: Eliminate potential double free on error path

# Type: Bug fix, no bug id.
Very small patch, two pointers set to null after being free'd. Looks good.

commit 748bfac2f7f44bd0daa6a76c09ccff9abe51c5e1
Author: Richard Kennedy <richard at rsk.demon.co.uk>

     ext4: return correct wbc.nr_to_write in ext4_da_writepages

# Type: Bug fix, no bug id.
Very small patch, one line removed, one added. Looks good.

commit ca0d70ef1e9f9901e8a4b16d1ddbe8fc2b3cd45b
Author: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

     ext4: Ensure zeroout blocks have no dirty metadata

# Type: Bug fix, no bug id.
Small patch. Looks good

commit 5f0cbfc3302855b184f6ecdc3d6e85722cccf8f1
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Patch up how we claim metadata blocks for quota purposes

# Type: Bug fix, with bug id.
Non-trivial patch. Hope it's good.

commit da7d750f5184fbb6680b7510f329aa3ebf8e7e29
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Fix accounting of reserved metadata blocks

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit cfc1cec16d12c151270027a5985fb7a5bc772fde
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Calculate metadata requirements more accurately

# Type: Seems like an optimization. No bug id.
Non-trivial patch. Hope it's good.

commit c20655de850a723528cca8baf4de2a5b3ef319cb
Author: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

     ext4: Handle -EDQUOT error on write

# Type: Bug fix (possible deadlock), no bug id.
Small patch. Looks good.

commit 2e5388dbce355177b657a37c6ae93563c26dc498
Author: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

     ext4: Fix quota accounting error with fallocate

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit f94d454de6bc3887feb71c3cc601bb7e639f62eb
Author: Aneesh Kumar K.V <aneesh.kumar at linux.vnet.ibm.com>

     ext4: Drop EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE flag

# Type: Bug fix (corruption), no bug id.
Small patch. Looks good.

commit 8bf3f7a72f40eccc1d8390269240941c3e11088c
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Use bitops to read/modify EXT4_I(inode)->i_state

# Type: Bug fix (racy conditions), no bug id.
Non small patch. However, it's a consistent code change
made in a number of places. Looks good.

commit cf19e2a653cd3ca59931260a37a2a3b6015a11a4
Author: Curt Wohlgemuth <curtw at google.com>

     ext4: Fix BUG_ON at fs/buffer.c:652 in no journal mode

# Type: Bug fix, bug id.
Small patch. Looks good.

commit fde75a46ac788c7ac5d7d2845f5516846db33f3e
Author: Jiaying Zhang <jiayingz at google.com>

     ext4: Add flag to files with blocks intentionally past EOF

# Type: Sort of bug fix, no bug id.
Small patch. Looks good.

commit b6178474de6d7144c0b27f22d228cd3795ae61fa
Author: Tao Ma <tao.ma at oracle.com>

     ext4: Fix fencepost error in chosing choosing group vs file preallocation.

# Type: Bug fix, no bug id.
Very small patch (one character '>=' -> '>'). Looks good.

commit 650b03c8be35230220bcbc404778b639b3980f7e
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: fix error handling in migrate

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 063685e56f5d641926f423d92a4cf564823f8cf7
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: explicitly remove inode from orphan list after failed direct io

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 42f4649913b23846463be31b5e693a06c41f02ae
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: Handle non empty on-disk orphan link

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit c6f43b2fff9f6e2cab3cbcf0803212ec65b8c740
Author: Toshiyuki Okajima <toshi.okajima at jp.fujitsu.com>

     ext4: make "offset" consistent in ext4_check_dir_entry()

# Type: Error message change.
Small patch. Looks good.

commit 73a4ca090d376e29ded0ac938a7748dffa120660
Author: Akira Fujita <a-fujita at rs.jp.nec.com>

     ext4: Fix insertion point of extent in mext_insert_across_blocks()

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 321967316335b3b4ae643da6c8cb4d9b3384439e
Author: Akira Fujita <a-fujita at rs.jp.nec.com>

     ext4: Fix the NULL reference in double_down_write_data_sem()

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit a042da7680d8e1f744eb3def71af64256670a1e5
Author: Akira Fujita <a-fujita at rs.jp.nec.com>

     ext4: Code cleanup for EXT4_IOC_MOVE_EXT ioctl

# Type: Non-bug code cleanup.
Looks good.

commit fe4d59c6057192975eed21865eca18b7ef647e07
Author: Jan Kara <jack at suse.cz>

     ext4: Fix estimate of # of blocks needed to write indirect-mapped files

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit 14d729361e014a76758834a7ec6c9cd1a3cbafbf
Author: Eric Sandeen <sandeen at redhat.com>

     ext4: Fixed inode allocator to correctly track a flex_bg's used_dirs

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 284f9e4660dcdd4c72d4720c88eea82abdc09a11
Author: Curt Wohlgemuth <curtw at google.com>

     ext4: Fix possible lost inode write in no journal mode

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit 4f11a060310ce3843eef04ef1a3f7330c3a3b8a1
Author: Curt Wohlgemuth <curtw at google.com>

     ext4: Fix buffer head leaks after calls to ext4_get_inode_loc()

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit 222b4f60719630ccdbf2747909edb51786103ef1
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Issue the discard operation *before* releasing the blocks to be reused

# Type: Bug fix, no bug id.
Moved a block of code from after call to release blocks to before call to
release blocks. Looks good.

commit 7e088e07763bc92d50e60b12f5b46ace23b490d2
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: check missed return value in ext4_sync_file()

# Type: Bug fix, no bug id.
Return return value from call. Looks good.

commit 9d95c63e466dc8fc149b500920dfd335827095a5
Author: Jing Zhang <zj.barak at gmail.com>

     ext4: fix memory leaks in error path handling of ext4_ext_zeroout()

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit a6e2846152e6c5ae7ccd35fa120b08da6fbeb55e
Author: Jing Zhang <zj.barak at gmail.com>

     ext4: Remove unnecessary call to ext4_get_group_desc() in mballoc

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit a95a707ac3a5a0a65242ee3ab5b2f095f041fdbd
Author: Jing Zhang <zj.barak at gmail.com>

     ext4: rename ext4_mb_release_desc() to ext4_mb_unload_buddy()

# Type: Non-bug, code cleanup.
Small-ish patch. Looks good.

commit f08ac871dd8fbbb98bde075494016bb7a1010a59
Author: Christian Borntraeger <borntraeger at de.ibm.com>

     ext4: allow defrag (EXT4_IOC_MOVE_EXT) in 32bit compat mode

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit aaac0ab9d14ac1edde1493dcbdf638242a602b81
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: fix quota accounting in case of fallocate

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 45556dd117e1e469833fb2ba36bd531d67a69943
Author: Eric Sandeen <sandeen at redhat.com>

     ext4: check s_log_groups_per_flex in online resize code

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit f935edf7c6f98a903d6a0f7dfdb411dbfa5dba76
Author: Eric Sandeen <sandeen at redhat.com>

     ext4: don't return to userspace after freezing the fs with a mutex held

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit 97678b2e67e0e5e0256cfec80ccd621c1bd02987
Author: Eric Sandeen <sandeen at redhat.com>

     ext4: stop issuing discards if not supported by device

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 81dad1d52b04dd581b1ed7b14f100eb9a2063c4e
Author: Eric Sandeen <sandeen at redhat.com>

     ext4: don't scan/accumulate more pages than mballoc will allocate

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit caddc6e0fa4e03e9f008279730a9ae9ca9eade73
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: Do not zero out uninitialized extents beyond i_size

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit d9f7794445f148d383755748f6fa12644a9dff58
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: clean up inode bitmaps manipulation in ext4_free_inode

# Type: Bug fix (corruption under heavy fs load), no bug id.
Non-trivial patch.

commit 42c3cc24401c6ff59224234ac4afb5a79ba48bcd
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: init statistics after journal recovery

# Type: Bug fix, with bug id.
Small code block moved. Looks ood.

commit 0d84783259e0624a11143b262655b7c0e1030714
Author: Curt Wohlgemuth <curtw at google.com>

     ext4: Remove extraneous newlines in ext4_msg() calls

# Type: Bug fix (new lines in msg calls), with bug id.
Small patch. Looks good.

commit 1d7aba301df769c80ac4cd6d5be5b66ee4dbbb24
Author: Nikanth Karthikesan <knikanth at suse.de>

     ext4: Prevent creation of files larger than RLIMIT_FSIZE using fallocate

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit 49a790575d55fe6730b9cef5ac394d70953b8d30
Author: Curt Wohlgemuth <curtw at google.com>

     ext4: check for a good block group before loading buddy pages

# Type: Multiple bug fix, with bug ids.
Moderate sized, non-complex patch. Looks good.

commit a03984cf12f5d510eb649b6ce22bf82b09ed2e48
Author: Jan Kara <jack at suse.cz>

     ext4: Show journal_checksum option

# Type: Bug fix, no bug id.
Simple patch. Looks good.

commit 9dae8bbbed0d3e6cf0cf12b80bccdcc0cc1ee3cc
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: Use bitops to read/modify i_flags in struct ext4_inode_info

# Type: Bug fix, with bug id.
Moderate sized, non-complex patch. Looks good.

commit 69121340327a7ad16f77db96909bebc148658622
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Avoid crashing on NULL ptr dereference on a filesystem error

# Type: Oops fix, with bug id.
Small patch. Looks good.

commit 671aa3d37b981e29680b7cd7dbcc8dd3d6671920
Author: Theodore Ts'o <tytso at mit.edu>

     ext4: Clear the EXT4_EOFBLOCKS_FL flag only when warranted

# Type: Bug fix, no bug id. (unlikely this would ever be hit)
Small patch. Looks good.

commit 5a8d986b1e66cd8f268fe9ea85afabd8d155141b
Author: Dmitry Monakhov <dmonakhov at openvz.org>

     ext4: restart ext4_ext_remove_space() after transaction restart

# Type: Bug fix, with bug id.
Small patch. Looks good.

commit 4ced4be6b69d9c4855056b1c3cf509261d4d72e7
Author: Ben Hutchings <ben at decadent.org.uk>

     ext4: Conditionally define compat ioctl numbers

# Type: Bug fix, no bug id.
Small patch. Looks good.

commit b66ddf4c040ae0a10f3b343c82df471e1d4169b6
Author: Ben Hutchings <ben at decadent.org.uk>

     ext4: Fix compat EXT4_IOC_ADD_GROUP

# Type: Bug fix, without bug id.
Small patch. Looks good.

commit f7da78d6983442c0877006c932a1f81b06b5f6b9
Author: Frank Mayhar <fmayhar at google.com>

     ext4: Make fsync sync new parent directories in no-journal mode

# Type: Bug fix, with bug id.
Moderate size and complexity patch. Looks good.


-- 
Brad Figg brad.figg at canonical.com http://www.canonical.com




More information about the kernel-team mailing list