All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing
@ 2011-05-14  6:03 Allison Henderson
  2011-05-16 15:09 ` Mingming Cao
  0 siblings, 1 reply; 2+ messages in thread
From: Allison Henderson @ 2011-05-14  6:03 UTC (permalink / raw)
  To: Ext4 Developers List, Yongqiang Yang, Mingming Cao, Theodore Tso

Hi all,

After applying this patch, the fsx test has been able to run ok all 
day (about 12hrs). So I think it's safe to send it out now.  Thx all!

Allison Henderson

Signed-off-by: Allison Henderson <achender@us.ibm.com>

---
:100644 100644 e363f21... 5f243da... M	fs/ext4/extents.c
 fs/ext4/extents.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e363f21..5f243da 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2818,8 +2818,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
 		    (EXT4_EXT_MAY_ZEROOUT & split_flag)) {
 			/* 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);
+					 cpu_to_le32(map->m_lblk);
+			zero_ex.ee_len = cpu_to_le16(allocated);
 			ext4_ext_store_pblock(&zero_ex,
 				ext4_ext_pblock(ex) + map->m_lblk - ee_block);
 			err = ext4_ext_zeroout(inode, &zero_ex);
@@ -2842,10 +2842,9 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
 					goto out;
 			}
 
-			allocated = map->m_lblk - ee_block + map->m_len;

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

* Re: [PATCH v2] ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing
  2011-05-14  6:03 [PATCH v2] ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing Allison Henderson
@ 2011-05-16 15:09 ` Mingming Cao
  0 siblings, 0 replies; 2+ messages in thread
From: Mingming Cao @ 2011-05-16 15:09 UTC (permalink / raw)
  To: Allison Henderson; +Cc: Ext4 Developers List, Yongqiang Yang, Theodore Tso

On Fri, 2011-05-13 at 23:03 -0700, Allison Henderson wrote:
> Hi all,
> 
> After applying this patch, the fsx test has been able to run ok all 
> day (about 12hrs). So I think it's safe to send it out now.  Thx all!
> 
> Allison Henderson
> 
> Signed-off-by: Allison Henderson <achender@us.ibm.com>

Looks good to me.

Reviewed-by: Mingming Cao <cmm@us.ibm.com>
> 
> ---
> :100644 100644 e363f21... 5f243da... M	fs/ext4/extents.c
>  fs/ext4/extents.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index e363f21..5f243da 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -2818,8 +2818,8 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
>  		    (EXT4_EXT_MAY_ZEROOUT & split_flag)) {
>  			/* 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);
> +					 cpu_to_le32(map->m_lblk);
> +			zero_ex.ee_len = cpu_to_le16(allocated);
>  			ext4_ext_store_pblock(&zero_ex,
>  				ext4_ext_pblock(ex) + map->m_lblk - ee_block);
>  			err = ext4_ext_zeroout(inode, &zero_ex);
> @@ -2842,10 +2842,9 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
>  					goto out;
>  			}
> 
> -			allocated = map->m_lblk - ee_block + map->m_len;
> -
>  			split_map.m_lblk = ee_block;
> -			split_map.m_len = allocated;
> +			split_map.m_len = map->m_lblk - ee_block + map->m_len;
> +			allocated = map->m_len;
>  		}
>  	}
> 



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

end of thread, other threads:[~2011-05-16 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-14  6:03 [PATCH v2] ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing Allison Henderson
2011-05-16 15:09 ` Mingming Cao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.