lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150323082243.GA3168@kernel>
Date:	Mon, 23 Mar 2015 16:22:43 +0800
From:	Wanpeng Li <wanpeng.li@...ux.intel.com>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	'Jaegeuk Kim' <jaegeuk@...nel.org>,
	'Changman Lee' <cm224.lee@...sung.com>,
	linux-f2fs-devel@...ts.sourceforge.net,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	'Wanpeng Li' <wanpeng.li@...ux.intel.com>
Subject: Re: [PATCH v2 1/2] f2fs: enable inline data by default

On Mon, Mar 23, 2015 at 04:36:18PM +0800, Chao Yu wrote:
>> >like F2FS_MOUNT_BG_GC.
>> >
>> >e.g.
>> >parse_options:
>> >	case Opt_noinline_data:
>> >		clear_opt(sbi, INLINE_DATA);
>> >		break;
>> >
>> >f2fs_show_options:
>> >	if (test_opt(sbi, INLINE_DATA))
>> >		seq_puts(seq, ",inline_data");
>> >	else
>> >		seq_puts(seq, ",noinline_data");
>> >
>> >So we can avoid to show both options "inline_data,noinline_data" in ->show_options
>
>Note "show content generated ->show_options", not content in /etc/mtab.
>
>> >if we mount with noinline_data, since this will make our user confused.
>> 
>> I didn't see "inline_data, noinline_data" w/ noinline_data mount option, just
>> "rw,noinline_data" dump out.
>
>Try 'cat /proc/mounts'?

Ah, I just try mount command, and "inline_data, noinline_data" dump out
when cat /proc/mounts, I will fix it soon. 

Regards,
Wanpeng Li

>
>Thanks,
>
>> 
>> Ping Jaegeuk!
>> 
>> Regards,
>> Wanpeng Li
>> 
>> >
>> >How do you think?
>> >
>> >Thanks,
>> >
>> >>
>> >>  #define clear_opt(sbi, option)	(sbi->mount_opt.opt &= ~F2FS_MOUNT_##option)
>> >>  #define set_opt(sbi, option)	(sbi->mount_opt.opt |= F2FS_MOUNT_##option)
>> >> diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
>> >> index d3e0599..0363b57 100644
>> >> --- a/fs/f2fs/inline.c
>> >> +++ b/fs/f2fs/inline.c
>> >> @@ -15,7 +15,7 @@
>> >>
>> >>  bool f2fs_may_inline(struct inode *inode)
>> >>  {
>> >> -	if (!test_opt(F2FS_I_SB(inode), INLINE_DATA))
>> >> +	if (!test_opt(F2FS_I_SB(inode), NOINLINE_DATA))
>> >>  		return false;
>> >>
>> >>  	if (f2fs_is_atomic_file(inode))
>> >> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
>> >> index fc6857f..7b17795 100644
>> >> --- a/fs/f2fs/super.c
>> >> +++ b/fs/f2fs/super.c
>> >> @@ -58,6 +58,7 @@ enum {
>> >>  	Opt_nobarrier,
>> >>  	Opt_fastboot,
>> >>  	Opt_extent_cache,
>> >> +	Opt_noinline_data,
>> >>  	Opt_err,
>> >>  };
>> >>
>> >> @@ -80,6 +81,7 @@ static match_table_t f2fs_tokens = {
>> >>  	{Opt_nobarrier, "nobarrier"},
>> >>  	{Opt_fastboot, "fastboot"},
>> >>  	{Opt_extent_cache, "extent_cache"},
>> >> +	{Opt_noinline_data, "noinline_data"},
>> >>  	{Opt_err, NULL},
>> >>  };
>> >>
>> >> @@ -372,6 +374,9 @@ static int parse_options(struct super_block *sb, char *options)
>> >>  		case Opt_extent_cache:
>> >>  			set_opt(sbi, EXTENT_CACHE);
>> >>  			break;
>> >> +		case Opt_noinline_data:
>> >> +			set_opt(sbi, NOINLINE_DATA);
>> >> +			break;
>> >>  		default:
>> >>  			f2fs_msg(sb, KERN_ERR,
>> >>  				"Unrecognized mount option \"%s\" or missing value",
>> >> @@ -606,6 +611,8 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
>> >>  		seq_puts(seq, ",fastboot");
>> >>  	if (test_opt(sbi, EXTENT_CACHE))
>> >>  		seq_puts(seq, ",extent_cache");
>> >> +	if (test_opt(sbi, NOINLINE_DATA))
>> >> +		seq_puts(seq, ",noinline_data");
>> >>  	seq_printf(seq, ",active_logs=%u", sbi->active_logs);
>> >>
>> >>  	return 0;
>> >> @@ -991,6 +998,7 @@ try_onemore:
>> >>  	sbi->active_logs = NR_CURSEG_TYPE;
>> >>
>> >>  	set_opt(sbi, BG_GC);
>> >> +	set_opt(sbi, INLINE_DATA);
>> >>
>> >>  #ifdef CONFIG_F2FS_FS_XATTR
>> >>  	set_opt(sbi, XATTR_USER);
>> >> --
>> >> 1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ