From mboxrd@z Thu Jan 1 00:00:00 1970 From: Changman Lee Subject: Re: [f2fs-dev] [PATCH] f2fs: move put_gc_inode into gc_mutex Date: Fri, 28 Nov 2014 15:08:37 +0900 Message-ID: <20141128060837.GB2819@lcm> References: <1417081374-31626-1-git-send-email-cm224.lee@samsung.com> <20141128035514.GA59415@jaegeuk-mac02.mot-mobility.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net To: Jaegeuk Kim Return-path: Received: from mailout3.samsung.com ([203.254.224.33]:54971 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbaK1GJ4 (ORCPT ); Fri, 28 Nov 2014 01:09:56 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFQ00BI3JSI0240@mailout3.samsung.com> for linux-fsdevel@vger.kernel.org; Fri, 28 Nov 2014 15:09:54 +0900 (KST) Content-disposition: inline In-reply-to: <20141128035514.GA59415@jaegeuk-mac02.mot-mobility.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Nov 27, 2014 at 07:55:14PM -0800, Jaegeuk Kim wrote: > Hi Changman, > > On Thu, Nov 27, 2014 at 06:42:54PM +0900, Changman Lee wrote: > > There in no any lock to protect gc_inode list so let's move into > > gc_mutex, otherwise it might be lost links of list. > > Could you explain why the links can be lost? > Cause the ilist is a local variable. Hi Jaegeuk, Oh, I missed ilist is a local variable. Sorry, ignore this patch. Thanks, > > IIRC, the reason why put_gc_inode is called outside of gc_mutex is to avoid > deadlock between f2fs_evict_inode and gc operations. > I'm not sure it still has a problem, but it is unclear that we have to move > put_gc_inode inside gc_mutex. > > Are you facing with any bug on this? > > Thanks, > > > > > Signed-off-by: Changman Lee > > --- > > fs/f2fs/gc.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > > index 657683c9..99e1720 100644 > > --- a/fs/f2fs/gc.c > > +++ b/fs/f2fs/gc.c > > @@ -733,9 +733,9 @@ gc_more: > > if (gc_type == FG_GC) > > write_checkpoint(sbi, &cpc); > > stop: > > - mutex_unlock(&sbi->gc_mutex); > > - > > put_gc_inode(&ilist); > > + > > + mutex_unlock(&sbi->gc_mutex); > > return ret; > > } > > > > -- > > 1.9.1 > > > > > > ------------------------------------------------------------------------------ > > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > > with Interactivity, Sharing, Native Excel Exports, App Integration & more > > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > _______________________________________________ > > Linux-f2fs-devel mailing list > > Linux-f2fs-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel