Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965717AbbLPDTw (ORCPT ); Tue, 15 Dec 2015 22:19:52 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:53491 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965701AbbLPDTt (ORCPT ); Tue, 15 Dec 2015 22:19:49 -0500 X-AuditID: cbfee61b-f793c6d00000236c-ff-5670d8524b09 From: Chao Yu To: "'Jaegeuk Kim'" Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <00fa01d136fa$7c028980$74079c80$@samsung.com> <20151215220238.GC66113@jaegeuk.local> <013501d137aa$f069ab40$d13d01c0$@samsung.com> <20151216024922.GA71308@jaegeuk.local> In-reply-to: <20151216024922.GA71308@jaegeuk.local> Subject: RE: [PATCH 7/8] f2fs: introduce new option for controlling data flush Date: Wed, 16 Dec 2015 11:19:06 +0800 Message-id: <013d01d137b0$9daa98f0$d8ffcad0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQJji5XCQ8mCB5+LoSfAKDaJcEtk9QHLBdZtAi+fnloBj2fi0p179ZoQ Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRmVeSWpSXmKPExsVy+t9jAd3gGwVhBvN+slk8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDIePn7MUvBSuOLh3boGxv98 XYycHBICJhJfFt5hg7DFJC7cWw9kc3EICSxllPi6fAkzhPOKUWLLlbksIFVsAioSyzv+M4HY IgJqEr37poDZzAIeEo0d31khGnYzSrSsnw/WwClgLPHl9E5GEFtYwE/i5pQOoKnsHCwCqhIN BSBRXgFLiaf3FzBC2IISPybfY4EYqSWxfudxqPHyEpvXvGWGOFRBYsfZ10D1HEAnuEkcOJ8K USIusfHILZYJjEKzkEyahWTSLCSTZiFpWcDIsopRIrUguaA4KT3XKC+1XK84Mbe4NC9dLzk/ dxMjOOCfSe9gPLzL/RCjAAejEg+vRkxBmBBrYllxZe4hRgkOZiUR3u54oBBvSmJlVWpRfnxR aU5q8SFGaQ4WJXHefZciw4QE0hNLUrNTUwtSi2CyTBycUg2MYfdVTotfWbM5/f1NxR2/t/Lt yihUSK17fmFeXPAl6w39d4S1l08LU1op5y3dZyo9mdkhWfyYVbDD8kOVHYJf1q6fHPjP3+2J scnss23BenVPm7juvTFbs7LqfPLZ588bjbkTancK33YrXsGyTdVkirXBhgPm77pV+9ZkneUw YPxacLFjjepXJZbijERDLeai4kQAZUWtu3QCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2698 Lines: 89 Hi Jaegeuk, > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Wednesday, December 16, 2015 10:49 AM > To: Chao Yu > Cc: linux-f2fs-devel@lists.sourceforge.net; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 7/8] f2fs: introduce new option for controlling data flush > > Hi Chao, > > On Wed, Dec 16, 2015 at 10:38:27AM +0800, Chao Yu wrote: > > ... > > > > > +++ b/fs/f2fs/super.c > > > > @@ -67,6 +67,7 @@ enum { > > > > Opt_extent_cache, > > > > Opt_noextent_cache, > > > > Opt_noinline_data, > > > > + Opt_data_flush, > > > > > > Need Opt_nodata_flush too. > > > > We need this unless we set data_flush as a default option. Is that right? > > I meant both of them. Yeah, I know that. But the point I meant was: Normally we can detect user's mount option by test_opt(DATA_FLUSH), but if data_flush option was set as a default option in f2fs, we need to introduce nodata_flush to indicate whether user want to disable it or not, because we can't disable data_flush option by mount without it since f2fs will set data_flush by itself. So it seems nodata_flush is redundant unless data_flush is set by default. How do you think of it? Thanks, > > Thanks, > > > > > Thanks, > > > > > > > > Thanks, > > > > > > > Opt_nodiscard, > > > > Opt_err, > > > > }; > > > > @@ -92,6 +93,7 @@ static match_table_t f2fs_tokens = { > > > > {Opt_extent_cache, "extent_cache"}, > > > > {Opt_noextent_cache, "noextent_cache"}, > > > > {Opt_noinline_data, "noinline_data"}, > > > > + {Opt_data_flush, "data_flush"}, > > > > {Opt_nodiscard, "nodiscard"}, > > > > {Opt_err, NULL}, > > > > }; > > > > @@ -411,6 +413,9 @@ static int parse_options(struct super_block *sb, char *options) > > > > case Opt_noinline_data: > > > > clear_opt(sbi, INLINE_DATA); > > > > break; > > > > + case Opt_data_flush: > > > > + clear_opt(sbi, DATA_FLUSH); > > > > + break; > > > > default: > > > > f2fs_msg(sb, KERN_ERR, > > > > "Unrecognized mount option \"%s\" or missing value", > > > > @@ -694,6 +699,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root) > > > > seq_puts(seq, ",extent_cache"); > > > > else > > > > seq_puts(seq, ",noextent_cache"); > > > > + if (test_opt(sbi, DATA_FLUSH)) > > > > + seq_puts(seq, ",data_flush"); > > > > seq_printf(seq, ",active_logs=%u", sbi->active_logs); > > > > > > > > return 0; > > > > -- > > > > 2.6.3 > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/