diff options
author | Curt Wohlgemuth <curtw@google.com> | 2011-02-26 12:27:52 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-02-26 12:27:52 -0500 |
commit | c7f5938adce6727b9d17785f289c1146bd88d678 (patch) | |
tree | 000d17633b6b3b28dd644704afb501b366ad1bbb /Documentation/block | |
parent | e0fd9b90765f604374c42de8ac59d6584afce264 (diff) | |
download | linux-stable-c7f5938adce6727b9d17785f289c1146bd88d678.tar.gz linux-stable-c7f5938adce6727b9d17785f289c1146bd88d678.tar.bz2 linux-stable-c7f5938adce6727b9d17785f289c1146bd88d678.zip |
ext4: fix ext4_da_block_invalidatepages() to handle page range properly
If ext4_da_block_invalidatepages() is called because of a
failure from ext4_map_blocks() in mpage_da_map_and_submit(),
it's supposed to clean up -- including unlock -- all the
pages in the mpd structure. But these values may not match
up, even on a system in which block size == page size:
mpd->b_blocknr != mpd->first_page
mpd->b_size != (mpd->next_page - mpd->first_page)
ext4_da_block_invalidatepages() has been using b_blocknr and
b_size; this patch changes it to use first_page and
next_page.
Tested: I injected a small number (5%) of failures in
ext4_map_blocks() in the case that the flags contain
EXT4_GET_BLOCKS_DELALLOC_RESERVE, and ran fsstress on this
kernel. Without this patch, I got hung tasks every time.
With this patch, I see no hangs in many runs of fsstress.
Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'Documentation/block')
0 files changed, 0 insertions, 0 deletions