From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gu Zheng Subject: Re: [PATCH 2/7] f2fs: remove the unuseful "issue_tail" list Date: Mon, 14 Apr 2014 09:12:18 +0800 Message-ID: <534B35F2.8000100@cn.fujitsu.com> References: <5347BAB7.6060306@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WZVb7-0004A9-GX for linux-f2fs-devel@lists.sourceforge.net; Mon, 14 Apr 2014 01:22:09 +0000 Received: from [59.151.112.132] (helo=heian.cn.fujitsu.com) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1WZVb5-00056s-Hc for linux-f2fs-devel@lists.sourceforge.net; Mon, 14 Apr 2014 01:22:09 +0000 In-Reply-To: <5347BAB7.6060306@cn.fujitsu.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Kim Cc: fsdevel , linux-kernel , f2fs Hi All, There seems to be a mistake in this patch, please ignore it. I'll send a reworked one later. Regards, Gu On 04/11/2014 05:49 PM, Gu Zheng wrote: > With the issue_list and dispatch_list, we can handle flush_merge > already, so remove the useless "issue_tail" list. > > Signed-off-by: Gu Zheng > --- > fs/f2fs/f2fs.h | 1 - > fs/f2fs/segment.c | 5 ++--- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 2ecac83..90109fa 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -358,7 +358,6 @@ struct f2fs_sm_info { > struct flush_cmd *issue_list; /* list for command issue */ > struct flush_cmd *dispatch_list; /* list for command dispatch */ > spinlock_t issue_lock; /* for issue list lock */ > - struct flush_cmd *issue_tail; /* list tail of issue list */ > }; > > /* > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index 524b7ed..8a6fe2a 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -209,7 +209,7 @@ repeat: > spin_lock(&sm_i->issue_lock); > if (sm_i->issue_list) { > sm_i->dispatch_list = sm_i->issue_list; > - sm_i->issue_list = sm_i->issue_tail = NULL; > + sm_i->issue_list = NULL; > } > spin_unlock(&sm_i->issue_lock); > > @@ -250,10 +250,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi) > > spin_lock(&sm_i->issue_lock); > if (sm_i->issue_list) > - sm_i->issue_tail->next = cmd; > + sm_i->issue_list->next = cmd; > else > sm_i->issue_list = cmd; > - sm_i->issue_tail = cmd; > spin_unlock(&sm_i->issue_lock); > > if (!sm_i->dispatch_list) ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbaDNBWL (ORCPT ); Sun, 13 Apr 2014 21:22:11 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:28302 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751198AbaDNBWB (ORCPT ); Sun, 13 Apr 2014 21:22:01 -0400 X-IronPort-AV: E=Sophos;i="4.97,853,1389715200"; d="scan'208";a="29207045" Message-ID: <534B35F2.8000100@cn.fujitsu.com> Date: Mon, 14 Apr 2014 09:12:18 +0800 From: Gu Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Kim CC: f2fs , fsdevel , linux-kernel Subject: Re: [PATCH 2/7] f2fs: remove the unuseful "issue_tail" list References: <5347BAB7.6060306@cn.fujitsu.com> In-Reply-To: <5347BAB7.6060306@cn.fujitsu.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.100] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All, There seems to be a mistake in this patch, please ignore it. I'll send a reworked one later. Regards, Gu On 04/11/2014 05:49 PM, Gu Zheng wrote: > With the issue_list and dispatch_list, we can handle flush_merge > already, so remove the useless "issue_tail" list. > > Signed-off-by: Gu Zheng > --- > fs/f2fs/f2fs.h | 1 - > fs/f2fs/segment.c | 5 ++--- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 2ecac83..90109fa 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -358,7 +358,6 @@ struct f2fs_sm_info { > struct flush_cmd *issue_list; /* list for command issue */ > struct flush_cmd *dispatch_list; /* list for command dispatch */ > spinlock_t issue_lock; /* for issue list lock */ > - struct flush_cmd *issue_tail; /* list tail of issue list */ > }; > > /* > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c > index 524b7ed..8a6fe2a 100644 > --- a/fs/f2fs/segment.c > +++ b/fs/f2fs/segment.c > @@ -209,7 +209,7 @@ repeat: > spin_lock(&sm_i->issue_lock); > if (sm_i->issue_list) { > sm_i->dispatch_list = sm_i->issue_list; > - sm_i->issue_list = sm_i->issue_tail = NULL; > + sm_i->issue_list = NULL; > } > spin_unlock(&sm_i->issue_lock); > > @@ -250,10 +250,9 @@ int f2fs_issue_flush(struct f2fs_sb_info *sbi) > > spin_lock(&sm_i->issue_lock); > if (sm_i->issue_list) > - sm_i->issue_tail->next = cmd; > + sm_i->issue_list->next = cmd; > else > sm_i->issue_list = cmd; > - sm_i->issue_tail = cmd; > spin_unlock(&sm_i->issue_lock); > > if (!sm_i->dispatch_list)