From patchwork Mon Jun 29 18:39:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 6691331 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 481F6C05AC for ; Mon, 29 Jun 2015 18:42:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75A16205B5 for ; Mon, 29 Jun 2015 18:42:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C8DB20569 for ; Mon, 29 Jun 2015 18:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753726AbbF2SmZ (ORCPT ); Mon, 29 Jun 2015 14:42:25 -0400 Received: from mail.kernel.org ([198.145.29.136]:38631 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753438AbbF2SkN (ORCPT ); Mon, 29 Jun 2015 14:40:13 -0400 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 10751205BD; Mon, 29 Jun 2015 18:40:11 +0000 (UTC) Received: from localhost (unknown [166.170.37.87]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1124B205B9; Mon, 29 Jun 2015 18:40:06 +0000 (UTC) From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 05/12] f2fs: fix wrong block address calculation for a split extent Date: Mon, 29 Jun 2015 11:39:29 -0700 Message-Id: <1435603176-63219-5-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> References: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes wrong calculation on block address field when an extent is split. Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7817167..dd62228 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -674,7 +674,7 @@ static void f2fs_update_extent_tree(struct inode *inode, pgoff_t fofs, endofs = dei.fofs + dei.len - 1; if (endofs - fofs >= F2FS_MIN_EXTENT_LEN) { set_extent_info(&ei, fofs + 1, - fofs - dei.fofs + dei.blk, endofs - fofs); + fofs - dei.fofs + dei.blk + 1, endofs - fofs); en2 = __insert_extent_tree(sbi, et, &ei, NULL); } }