From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979AbcKEHCo (ORCPT ); Sat, 5 Nov 2016 03:02:44 -0400 Received: from mail.kernel.org ([198.145.29.136]:38584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364AbcKEHCk (ORCPT ); Sat, 5 Nov 2016 03:02:40 -0400 Date: Sat, 5 Nov 2016 00:02:38 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 3/3 v2] f2fs: keep dirty inodes selectively for checkpoint Message-ID: <20161105070238.GB10986@jaegeuk> References: <20161017215645.435-1-jaegeuk@kernel.org> <20161017215645.435-3-jaegeuk@kernel.org> <20161020022609.GA39988@jaegeuk> <490443dd-f293-930b-55a8-0f94981e6e4b@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490443dd-f293-930b-55a8-0f94981e6e4b@kernel.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 05, 2016 at 10:44:07AM +0800, Chao Yu wrote: > On 2016/10/20 10:26, Jaegeuk Kim wrote: > > Change log from v1: > > o avoid performance regression > > > >>From b34a3d3c4c3fa2d6e000acc99bc5216a247bd6cb Mon Sep 17 00:00:00 2001 > > From: Jaegeuk Kim > > Date: Fri, 14 Oct 2016 11:51:23 -0700 > > Subject: [PATCH] f2fs: keep dirty inodes selectively for checkpoint > > > > This is to avoid no free segment bug during checkpoint caused by a number of > > dirty inodes. > > > > The case was reported by Chao like this. > > > > 1. mount with lazytime option > > 2. fragment space > > 3. touch all files in the image > > 4. umount > > > > In this case, we actually don't need to flush dirty inode to inode page during > > checkpoint. > > > > Reported-by: Chao Yu > > Signed-off-by: Jaegeuk Kim > > Good job! IMO, main job of checkpoint is to keep filesystem being consistent, > not flush dirty datas of vfs/fs as much as possible, if there are some > restrictions for the interface like fsync, syncfs, sync, the caller of > checkpoint() should do related job like marking lazytime inode I_DIRTY_SYNC or > flush last data in dirty inode into filesystem's cache, and so on. :) > > BTW, can you change commit log a bit as below: Okay, not a big deal. > > 1. mount with lazytime option > 2. fill 4k file until disk is full > 3. sync filesystem > 4. read all files in the image > 5. umount > > Reviewed-by: Chao Yu > > Thanks,