From mboxrd@z Thu Jan 1 00:00:00 1970 From: 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> References: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z9dyb-0000gW-Kj for linux-f2fs-devel@lists.sourceforge.net; Mon, 29 Jun 2015 18:40:17 +0000 Received: from mail.kernel.org ([198.145.29.136]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Z9dya-0005Hm-UI for linux-f2fs-devel@lists.sourceforge.net; Mon, 29 Jun 2015 18:40:17 +0000 In-Reply-To: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim This patch fixes wrong calculation on block address field when an extent is split. Signed-off-by: Jaegeuk Kim --- 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); } } -- 2.1.1 ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/