From patchwork Sat May 14 06:03:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 95544 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7B854B6EED for ; Sat, 14 May 2011 16:03:20 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390Ab1ENGDS (ORCPT ); Sat, 14 May 2011 02:03:18 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]:39889 "EHLO e3.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373Ab1ENGDS (ORCPT ); Sat, 14 May 2011 02:03:18 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4E5fRH7022350 for ; Sat, 14 May 2011 01:41:27 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4E63Chn101488 for ; Sat, 14 May 2011 02:03:13 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4E63C20018489 for ; Sat, 14 May 2011 02:03:12 -0400 Received: from [9.48.118.235] (sig-9-48-118-235.mts.ibm.com [9.48.118.235]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p4E63B01018471; Sat, 14 May 2011 02:03:11 -0400 Message-ID: <4DCE1B19.9070503@linux.vnet.ibm.com> Date: Fri, 13 May 2011 23:03:05 -0700 From: Allison Henderson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Ext4 Developers List , Yongqiang Yang , Mingming Cao , Theodore Tso Subject: [PATCH v2] ext4: ext4_ext_convert_to_initialized bug found in extended FSX testing Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 Reviewed-by: Mingming Cao --- :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; } }