[PATCH] enable ES_AGGRESSIVE_TEST V2

From: Dmitry Monakhov
Date: Tue Apr 02 2013 - 15:33:16 EST



Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
---
fs/ext4/extents_status.h | 2 +-
fs/ext4/inode.c | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/fs/ext4/extents_status.h b/fs/ext4/extents_status.h
index d8e2d4d..70233a6 100644
--- a/fs/ext4/extents_status.h
+++ b/fs/ext4/extents_status.h
@@ -24,7 +24,7 @@
* With ES_AGGRESSIVE_TEST defined, the result of es caching will be
* checked with old map_block's result.
*/
-#define ES_AGGRESSIVE_TEST__
+#define ES_AGGRESSIVE_TEST

/*
* These flags live in the high bits of extent_status.es_pblk
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 840a23e..7712aff 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1546,7 +1546,18 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
}
if (buffer_unwritten(bh) ||
buffer_mapped(bh))
- BUG_ON(bh->b_blocknr != pblock);
+ if (bh->b_blocknr != pblock) {
+ printk(KERN_ERR "mpage_da_submit_io failed"
+ " block=%llu != b_blocknr=%llu\n",
+ (unsigned long long)pblock,
+ (unsigned long long)bh->b_blocknr);
+ printk(KERN_ERR "ino:%ld lbkl:%lu, "
+ "b_state=0x%08lx, b_size=%zu\n",
+ inode->i_ino, cur_logical,
+ bh->b_state, bh->b_size);
+ WARN_ON(1);
+ goto skip_page;
+ }
if (map->m_flags & EXT4_MAP_UNINIT)
set_buffer_uninit(bh);
clear_buffer_unwritten(bh);
@@ -1556,8 +1567,10 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
* skip page if block allocation undone and
* block is dirty
*/
- if (ext4_bh_delay_or_unwritten(NULL, bh))
+ if (ext4_bh_delay_or_unwritten(NULL, bh)) {
+ skip_page:
skip_page = 1;
+ }
bh = bh->b_this_page;
block_start += bh->b_size;
cur_logical++;
--
1.7.1


--=-=-=

So once you hit the bug it will print a lot of warnings and try to
pretend what nothing is happens.

So my predictions is follows:
1) with enable_ES_AGGRESSIVE_TEST-V2.diff patch you will see a lot of
warnings

2) with enable_ES_AGGRESSIVE_TEST-V2.diff and
http://nerdbynature.de/bits/3.9.0-rc4/ext4/disable-es_lookup_extent.patch

Issue probably will go away (will be hidden)

>
> Thanks,
> Christian.
>
> [0] http://nerdbynature.de/bits/3.9.0-rc4/ext4/
> --
> BOFH excuse #344:
>
> Network failure - call NBC

--=-=-=--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/