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]
Date:   Sat, 7 Jul 2018 09:44:32 +0800
From:   Chao Yu <chao@...nel.org>
To:     Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <yuchao0@...wei.com>
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: enable real-time discard by default

On 2018/7/7 9:13, Jaegeuk Kim wrote:
> On 07/05, Chao Yu wrote:
>> f2fs is focused on flash based storage, so let's enable real-time
>> discard by default, if user don't want to enable it, 'nodiscard'
>> mount option should be used on mount.
>>
>> Signed-off-by: Chao Yu <yuchao0@...wei.com>
>> ---
>>  fs/f2fs/super.c | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
>> index 848badda50ad..980edeb0b650 100644
>> --- a/fs/f2fs/super.c
>> +++ b/fs/f2fs/super.c
>> @@ -1366,12 +1366,11 @@ static void default_options(struct f2fs_sb_info *sbi)
>>  	set_opt(sbi, NOHEAP);
>>  	sbi->sb->s_flags |= SB_LAZYTIME;
>>  	set_opt(sbi, FLUSH_MERGE);
>> -	if (f2fs_sb_has_blkzoned(sbi->sb)) {
> 
> I added this.
> 
> 	if (blk_queue_discard(bdev_get_queue(sbi->sb->s_bdev)))

That's correct. Thank you! :)

Thanks,

> 
>> +	set_opt(sbi, DISCARD);
>> +	if (f2fs_sb_has_blkzoned(sbi->sb))
>>  		set_opt_mode(sbi, F2FS_MOUNT_LFS);
>> -		set_opt(sbi, DISCARD);
>> -	} else {
>> +	else
>>  		set_opt_mode(sbi, F2FS_MOUNT_ADAPTIVE);
>> -	}
>>  
>>  #ifdef CONFIG_F2FS_FS_XATTR
>>  	set_opt(sbi, XATTR_USER);
>> -- 
>> 2.18.0.rc1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ