[f2fs-dev] [PATCH -next 000/491] treewide: use fallthrough;

2020-03-10 Thread Joe Perches
es matched by all F: patterns in in each section. Done via the perl script below and the previously posted cvt_fallthrough.pl script. Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/ These patches are based on next-20200310 and are available in gi

Re: [f2fs-dev] [PATCH 2/5] f2fs: force compressed data into warm area

2020-03-10 Thread Chao Yu
On 2020/3/11 0:32, Jaegeuk Kim wrote: > On 03/10, Chao Yu wrote: >> Generally, data shows better continuity in warm data area as its >> default allocation direction is right, in order to enhance >> sequential read/write performance of compress inode, let's force >> compress data into warm area. It

Re: [f2fs-dev] [PATCH] writeback: avoid double-writing the inode on a lazytime expiration

2020-03-10 Thread Eric Biggers
On Fri, Mar 06, 2020 at 09:00:43PM -0500, Theodore Ts'o wrote: > In the case that an inode has dirty timestamp for longer than the > lazytime expiration timeout (or if all such inodes are being flushed > out due to a sync or syncfs system call), we need to inform the file > system that the inode is

Re: [f2fs-dev] [PATCH 1/5] f2fs: change default compression algorithm

2020-03-10 Thread Jaegeuk Kim
On 03/11, Chao Yu wrote: > On 2020/3/11 0:15, Eric Biggers wrote: > > On Tue, Mar 10, 2020 at 08:50:05PM +0800, Chao Yu wrote: > >> Use LZ4 as default compression algorithm, as compared to LZO, it shows > >> almost the same compression ratio and much better decompression speed. > >> > >> Signed-off

Re: [f2fs-dev] [PATCH] fscrypt: don't evict dirty inodes after removing key

2020-03-10 Thread Eric Biggers
On Thu, Mar 05, 2020 at 12:41:38AM -0800, Eric Biggers wrote: > From: Eric Biggers > > After FS_IOC_REMOVE_ENCRYPTION_KEY removes a key, it syncs the > filesystem and tries to get and put all inodes that were unlocked by the > key so that unused inodes get evicted via fscrypt_drop_inode(). > Norm

Re: [f2fs-dev] [PATCH 1/5] f2fs: change default compression algorithm

2020-03-10 Thread Chao Yu
On 2020/3/11 0:15, Eric Biggers wrote: > On Tue, Mar 10, 2020 at 08:50:05PM +0800, Chao Yu wrote: >> Use LZ4 as default compression algorithm, as compared to LZO, it shows >> almost the same compression ratio and much better decompression speed. >> >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/supe

Re: [f2fs-dev] [PATCH 2/5] f2fs: force compressed data into warm area

2020-03-10 Thread Jaegeuk Kim
On 03/10, Chao Yu wrote: > Generally, data shows better continuity in warm data area as its > default allocation direction is right, in order to enhance > sequential read/write performance of compress inode, let's force > compress data into warm area. Not quite sure tho, compressed blocks are logi

Re: [f2fs-dev] [PATCH] f2fs: fix to check i_compr_blocks correctly

2020-03-10 Thread Jaegeuk Kim
On 03/10, Chao Yu wrote: > Hi Jaegeuk, > > On 2020-2-25 18:26, Chao Yu wrote: > > inode.i_blocks counts based on 512byte sector, we need to convert > > to 4kb sized block count before comparing to i_compr_blocks. > > > > In addition, add to print message when sanity check on inode > > compression

Re: [f2fs-dev] [PATCH 1/5] f2fs: change default compression algorithm

2020-03-10 Thread Eric Biggers
On Tue, Mar 10, 2020 at 08:50:05PM +0800, Chao Yu wrote: > Use LZ4 as default compression algorithm, as compared to LZO, it shows > almost the same compression ratio and much better decompression speed. > > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [f2fs-dev] [PATCH] f2fs: fix to check i_compr_blocks correctly

2020-03-10 Thread Chao Yu
Hi Jaegeuk, On 2020-2-25 18:26, Chao Yu wrote: inode.i_blocks counts based on 512byte sector, we need to convert to 4kb sized block count before comparing to i_compr_blocks. In addition, add to print message when sanity check on inode compression configs failed. Signed-off-by: Chao Yu --- fs

[f2fs-dev] [PATCH 5/5] f2fs: allow to clear F2FS_COMPR_FL flag

2020-03-10 Thread Chao Yu
If regular inode has no compressed cluster, allow using 'chattr -c' to remove its compress flag, recovering it to a non-compressed file. Signed-off-by: Chao Yu --- fs/f2fs/file.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 08c

[f2fs-dev] [PATCH 4/5] f2fs: fix to check dirty pages during compressed inode conversion

2020-03-10 Thread Chao Yu
Compressed cluster can be generated during dirty data writeback, if there is dirty pages on compressed inode, it needs to disable converting compressed inode to non-compressed one. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs

[f2fs-dev] [PATCH 2/5] f2fs: force compressed data into warm area

2020-03-10 Thread Chao Yu
Generally, data shows better continuity in warm data area as its default allocation direction is right, in order to enhance sequential read/write performance of compress inode, let's force compress data into warm area. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 5 +++-- 1 file changed, 3 ins

[f2fs-dev] [PATCH 3/5] f2fs: fix to account compressed inode correctly

2020-03-10 Thread Chao Yu
stat_inc_compr_inode() needs to check FI_COMPRESSED_FILE flag, so in f2fs_disable_compressed_file(), we should call stat_dec_compr_inode() before clearing FI_COMPRESSED_FILE flag. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2f

[f2fs-dev] [PATCH 1/5] f2fs: change default compression algorithm

2020-03-10 Thread Chao Yu
Use LZ4 as default compression algorithm, as compared to LZO, it shows almost the same compression ratio and much better decompression speed. Signed-off-by: Chao Yu --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index db3