linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ext4_ext_convert_to_initialized bug found in extended FSX testing
@ 2011-05-10 17:56 Allison Henderson
  2011-05-11  1:47 ` Yongqiang Yang
  0 siblings, 1 reply; 8+ messages in thread
From: Allison Henderson @ 2011-05-10 17:56 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Yongqiang Yang

Hi All,

We've been trying to get punch hole through some extended fsx tests, and I ran across some other tests that were failing because the test file contained zeros where it shouldn't.  I made this fix to the ext4_ext_convert_to_initialized and the test has been running smooth for about an hour now.  Yongqiang, this one looks like it may have been associated with the split extents clean up patch.  Would you mind taking a look at this fix and giving it your ok if it looks good?  Thx!

Signed-off-by: Allison Henderson <achender@us.ibm.com>
---
:100644 100644 e363f21... ce69450... M	fs/ext4/extents.c
 fs/ext4/extents.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e363f21..ce69450 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2819,7 +2819,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
 			/* case 3 */
 			zero_ex.ee_block =
 					 cpu_to_le32(map->m_lblk + map->m_len);
-			zero_ex.ee_len = cpu_to_le16(allocated - map->m_len);
+			zero_ex.ee_len = cpu_to_le16(ee_len -
+						allocated - map->m_len);
 			ext4_ext_store_pblock(&zero_ex,
 				ext4_ext_pblock(ex) + map->m_lblk - ee_block);
 			err = ext4_ext_zeroout(inode, &zero_ex);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-13  1:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 17:56 ext4_ext_convert_to_initialized bug found in extended FSX testing Allison Henderson
2011-05-11  1:47 ` Yongqiang Yang
2011-05-11  7:17   ` Allison Henderson
2011-05-11 13:58   ` Allison Henderson
2011-05-12  1:15   ` Mingming Cao
2011-05-12 21:00     ` Allison Henderson
2011-05-12 21:15     ` Mingming Cao
2011-05-13  1:52     ` Yongqiang Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).