[PATCH v2] f2fs: handle newly created page when revoking inmem pages

2018-01-10 Thread Daeho Jeong
__f2fs_replace_block() cannot handle NEW_ADDR as new_blkaddr properly and a kernel panic occurrs. Signed-off-by: Daeho Jeong Tested-by: Shu Tan Reviewed-by: Chao Yu --- fs/f2fs/segment.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c

[PATCH] f2fs: prevent newly created inode from being dirtied incorrectly

2018-01-10 Thread Daeho Jeong
still linked in the global dirty list of f2fs and this will cause a kernel panic. So, we will prevent the newly created inode from being dirtied during the FI_NEW_INODE flag of the inode is set. We will make it dirty right after the flag is cleared. Signed-off-by: Daeho Jeong Signed-off-by: Young

[PATCH] f2fs: prevent newly created inode from being dirtied incorrectly

2018-01-11 Thread Daeho Jeong
still linked in the global dirty list of f2fs and this will cause a kernel panic. So, we will prevent the newly created inode from being dirtied during the FI_NEW_INODE flag of the inode is set. We will make it dirty right after the flag is cleared. Signed-off-by: Daeho Jeong Signed-off-by: Young

[PATCH] f2fs: handle newly created page when revoking inmem pages

2018-01-09 Thread Daeho Jeong
__f2fs_replace_block() cannot handle NEW_ADDR as new_blkaddr properly and a kernel panic occurrs. Signed-off-by: Daeho Jeong Tested-by: Shu Tan --- fs/f2fs/segment.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c117e09..463f420

Re: [PATCH] f2fs: handle newly created page when revoking inmem pages

2018-01-09 Thread Daeho Jeong
Hi Chao, > Original intention here is to recover status to the timing before > committing atomic write. As at that timing blkaddr in dnode should be > cur->old_addr(NEW_ADDR), so we need to change to call:   > f2fs_update_data_blkaddr(&dn, NEW_ADDR); Ok, I'll change NULL_ADDR to NEW_ADDR. Thanks

[PATCH v2] f2fs: handle newly created page when revoking inmem pages

2018-01-09 Thread Daeho Jeong
__f2fs_replace_block() cannot handle NEW_ADDR as new_blkaddr properly and a kernel panic occurrs. Signed-off-by: Daeho Jeong Tested-by: Shu Tan --- fs/f2fs/segment.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c117e09..0673d08

[PATCH] f2fs: fix checkpoint mount option wrong combination

2021-01-31 Thread Daeho Jeong
From: Daeho Jeong As checkpoint=merge comes in, mount option setting related to checkpoint had been mixed up. Fixed it. Signed-off-by: Daeho Jeong --- fs/f2fs/super.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index

[PATCH] f2fs: prevent setting ioprio of thread not in merge mode

2021-01-31 Thread Daeho Jeong
From: Daeho Jeong It causes a crash to change the ioprio of checkpoint thread not in checkpoint=merge. I fixed that to prevent setting the ioprio of the thread when checkpoint=merge is not enabled. Signed-off-by: Daeho Jeong --- fs/f2fs/sysfs.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [f2fs-dev] [PATCH] f2fs: fix checkpoint mount option wrong combination

2021-02-01 Thread Daeho Jeong
fsync_mode, whint_mode and etc. So, the answer will be "checkpoint=enable". What do you think? 2021년 2월 1일 (월) 오후 9:40, Chao Yu 님이 작성: > > On 2021/2/1 8:06, Daeho Jeong wrote: > > From: Daeho Jeong > > > > As checkpoint=merge comes in, mount option setting relate

Re: [f2fs-dev] [PATCH] f2fs: fix checkpoint mount option wrong combination

2021-02-01 Thread Daeho Jeong
heckpoint=disable remount checkpoint=merge,checkpoint=enable => checkpoint=enable Like mount fsync_mode=posix, fsync_mode=strict, fsync_mode=nobarrier => fsync_mode=nobarrier 2021년 2월 2일 (화) 오전 5:11, Jaegeuk Kim 님이 작성: > > On 02/01, Daeho Jeong wrote: > > Actually, I think we ne

Re: [f2fs-dev] [PATCH] f2fs: fix checkpoint mount option wrong combination

2021-02-01 Thread Daeho Jeong
For less confusion, I am going to separate the "merge" option from "checkpoint=". I am adding another "ckpt_merge" option. :) 2021년 2월 2일 (화) 오전 8:33, Daeho Jeong 님이 작성: > > The rightmost one is the final option. And checkpoint=merge means > checkpo

[PATCH v2] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-01 Thread Daeho Jeong
From: Daeho Jeong As checkpoint=merge comes in, mount option setting related to checkpoint had been mixed up and it became hard to understand. So, I separated this option from "checkpoint=" and made another mount option "checkpoint_merge" for this. Signed-off-by: Daeho Je

Re: [f2fs-dev] [PATCH v2] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
little radical. :) What do you think? 2021년 2월 2일 (화) 오후 4:40, Chao Yu 님이 작성: > > On 2021/2/2 13:18, Daeho Jeong wrote: > > From: Daeho Jeong > > > > As checkpoint=merge comes in, mount option setting related to checkpoint > > had been mixed up and it became hard

Re: [f2fs-dev] [PATCH v2] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
If I understand it correctly, the only thing I have to do now is remove "nocheckpoint_merge" now. Am I correct? :) 2021년 2월 2일 (화) 오후 5:30, Chao Yu 님이 작성: > > On 2021/2/2 16:02, Daeho Jeong wrote: > > I chose the same step with "flush_merge", because it doesn&#x

[PATCH v3] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
From: Daeho Jeong As checkpoint=merge comes in, mount option setting related to checkpoint had been mixed up and it became hard to understand. So, I separated this option from "checkpoint=" and made another mount option "checkpoint_merge" for this. Signed-off-by: Daeho Je

Re: [f2fs-dev] [PATCH v3] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
ot;data" argument in the below. f2fs_remount(struct super_block *sb, int *flags, char *data) If we don't provide the "nocheckpoint_merge" option, how can we turn off the "checkpoint_merge" option which is turned on in the previous mount? 2021년 2월 2일 (화) 오후 6:28, Chao

Re: [f2fs-dev] [PATCH v3] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
mount -o remount,nocheckpoint_merge /dir" It would be more convenient to users. What do you think? 2021년 2월 2일 (화) 오후 6:55, Chao Yu 님이 작성: > > On 2021/2/2 17:44, Daeho Jeong wrote: > > When we remount it without the "checkpoint_merge" option, shouldn't we > > nee

[PATCH v4] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
From: Daeho Jeong As checkpoint=merge comes in, mount option setting related to checkpoint had been mixed up and it became hard to understand. So, I separated this option from "checkpoint=" and made another mount option "checkpoint_merge" for this. Signed-off-by: Daeho Je

[PATCH v5] f2fs: rename checkpoint=merge mount option to checkpoint_merge

2021-02-02 Thread Daeho Jeong
From: Daeho Jeong As checkpoint=merge comes in, mount option setting related to checkpoint had been mixed up and it became hard to understand. So, I separated this option from "checkpoint=" and made another mount option "checkpoint_merge" for this. Signed-off-by: Daeho Je

[PATCH] f2fs: protect new segment allocation in expand_inode_data

2020-05-31 Thread Daeho Jeong
From: Daeho Jeong Found a new segemnt allocation without f2fs_lock_op() in expand_inode_data(). So, when we do fallocate() for a pinned file and trigger checkpoint very frequently and simultaneously. F2FS gets stuck in the below code of do_checkpoint() forever. f2fs_sync_meta_pages(sbi, META

[PATCH] f2fs: make file immutable even if releasing zero compression block

2020-07-29 Thread Daeho Jeong
From: Daeho Jeong When we use F2FS_IOC_RELEASE_COMPRESS_BLOCKS ioctl, if we can't find any compressed blocks in the file even with large file size, the ioctl just ends up without changing the file's status as immutable. It makes the user, who expects that the file is immutable when

[PATCH] f2fs: change virtual mapping way for compression pages

2020-08-10 Thread Daeho Jeong
From: Daeho Jeong By profiling f2fs compression works, I've found vmap() callings are bottlenecks of f2fs decompression path. Changing these with vm_map_ram(), we can enhance f2fs decompression speed pretty much. [Verification] dd if=/dev/zero of=dummy bs=1m count=1000 echo 3 > /pro

Re: [f2fs-dev] [PATCH] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
) 오후 4:55, Chao Yu 님이 작성: > > On 2020/8/11 15:15, Gao Xiang wrote: > > On Tue, Aug 11, 2020 at 12:37:53PM +0900, Daeho Jeong wrote: > >> From: Daeho Jeong > >> > >> By profiling f2fs compression works, I've found vmap() callings are > >> bottle

Re: [f2fs-dev] [PATCH] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
Plus, when we use vmap(), vmap() normally executes in a short time like vm_map_ram(). But, sometimes, it has a very long delay. 2020년 8월 11일 (화) 오후 6:28, Daeho Jeong 님이 작성: > > Actually, as you can see, I use the whole zero data blocks in the test file. > It can maximize the effect of

Re: [f2fs-dev] [PATCH] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
Sure, I'll update the test condition as you said in the commit message. FYI, the test is done with 16kb chunk and Pixel 3 (arm64) device. Thanks, 2020년 8월 11일 (화) 오후 7:18, Gao Xiang 님이 작성: > > On Tue, Aug 11, 2020 at 06:33:26PM +0900, Daeho Jeong wrote: > > Plus, when we

Re: [f2fs-dev] [PATCH] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
20 at 08:21:23PM +0900, Daeho Jeong wrote: > > Sure, I'll update the test condition as you said in the commit message. > > FYI, the test is done with 16kb chunk and Pixel 3 (arm64) device. > > Yeah, anyway, it'd better to lock the freq and offline the little > cores

[PATCH v2] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
From: Daeho Jeong By profiling f2fs compression works, I've found vmap() callings have unexpected hikes in the execution time in our test environment and those are bottlenecks of f2fs decompression path. Changing these with vm_map_ram(), we can enhance f2fs decompression speed pretty

[PATCH v3] f2fs: change virtual mapping way for compression pages

2020-08-11 Thread Daeho Jeong
From: Daeho Jeong By profiling f2fs compression works, I've found vmap() callings have unexpected hikes in the execution time in our test environment and those are bottlenecks of f2fs decompression path. Changing these with vm_map_ram(), we can enhance f2fs decompression speed pretty

[PATCH 2/2] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-10 Thread Daeho Jeong
From: Daeho Jeong Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and

[PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-10 Thread Daeho Jeong
From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue caused by slow checkpoint

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Daeho Jeong
Got it~ :) 2021년 1월 11일 (월) 오후 6:50, Jaegeuk Kim 님이 작성: > > On 01/11, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint

Re: [f2fs-dev] [PATCH 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-11 Thread Daeho Jeong
2021년 1월 11일 (월) 오후 6:34, Chao Yu 님이 작성: > > On 2021/1/11 13:15, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint

Re: [f2fs-dev] [PATCH v3] f2fs: fix race of pending_pages in decompression

2020-12-07 Thread Daeho Jeong
more making sense. Thanks, 2020년 12월 8일 (화) 오전 5:31, Eric Biggers 님이 작성: > > On Sat, Dec 05, 2020 at 01:26:26PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > I found out f2fs_free_dic() is invoked in a wrong timing, but > > f2fs_verify_bio() still neede

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add compress_mode mount option

2020-12-07 Thread Daeho Jeong
12월 8일 (화) 오후 12:51, Eric Biggers 님이 작성: > > On Tue, Dec 01, 2020 at 01:08:02PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We will add a new "compress_mode" mount option to control file > > compression mode. This supports "fs"

[PATCH v4 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-18 Thread Daeho Jeong
From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue caused by slow checkpoint

Re: [f2fs-dev] [PATCH v4 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-19 Thread Daeho Jeong
Sorry, I think you were definitely confused. There is no change for 2/2. So I didn't send it. Next time, I am going to send it all, even though some of them don't have changes. 2021년 1월 20일 (수) 오전 4:08, Jaegeuk Kim 님이 작성: > > Is there v4 2/2? > > On 01/19, Daeho Jeong

[PATCH v2 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-13 Thread Daeho Jeong
From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue caused by slow checkpoint

[PATCH v2 2/2] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-13 Thread Daeho Jeong
From: Daeho Jeong Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and

[PATCH v2] f2fs: add sysfs nodes to get accumulated compression info

2021-03-04 Thread Daeho Jeong
From: Daeho Jeong Added acc_compr_inodes to show accumulated compressed inode count and acc_compr_blocks to show accumulated secured block count with compression in sysfs. These can be re-initialized to "0" by writing "0" value in one of both. Signed-off-by: Daeho Jeon

[PATCH] f2fs: add sysfs nodes to get accumulated compression info

2021-03-04 Thread Daeho Jeong
From: Daeho Jeong Added acc_compr_inodes to show accumulated compressed inode count and acc_compr_blocks to show accumulated secured block count with compression in sysfs. These can be re-initialized to "0" by writing "0" value in one of both. Signed-off-by: Daeho Jeong --

[PATCH v2 1/2] f2fs: add compress_mode mount option

2020-11-30 Thread Daeho Jeong
From: Daeho Jeong We will add a new "compress_mode" mount option to control file compression mode. This supports "fs" and "user". In "fs" mode (default), f2fs does automatic compression on the compression enabled files. In "user" mode, f2fs di

[PATCH v2 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-30 Thread Daeho Jeong
From: Daeho Jeong Added two ioctl to decompress/compress explicitly the compression enabled file in "compress_mode=user" mount option. Using these two ioctls, the users can make a control of compression and decompression of their files. Signed-off-by: Daeho Jeong --- v2: reformed c

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-23 Thread Daeho Jeong
description about these in Documentation/filesystems/f2fs.rst and I implemented tests internally. 2020년 11월 24일 (화) 오전 3:48, Eric Biggers 님이 작성: > > On Mon, Nov 23, 2020 at 12:17:51PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added two ioctl to decompress/compress ex

Re: [f2fs-dev] [PATCH 1/2] f2fs: add compress_mode mount option

2020-11-23 Thread Daeho Jeong
Jaegeuk, Got it. Eric, Yep. 2020년 11월 24일 (화) 오전 3:46, Eric Biggers 님이 작성: > > On Mon, Nov 23, 2020 at 12:17:50PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We will add a new "compress_mode" mount option to control file > > compression

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-23 Thread Daeho Jeong
2020년 11월 24일 (화) 오전 8:29, Eric Biggers 님이 작성: > > On Tue, Nov 24, 2020 at 08:02:21AM +0900, Daeho Jeong wrote: > > Jaegeuk, > > > > My mistake~ > > > > Eric, > > > > What I want is like do_page_cache_ra(), but I used > > page_cache_ra_unbounde

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
ode) && idx < DIV_ROUND_UP(inode->i_size, PAGE_SIZE); } 2020년 12월 4일 (금) 오후 12:28, Eric Biggers 님이 작성: > > On Fri, Dec 04, 2020 at 09:58:47AM +0900, Daeho Jeong wrote: > > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c > > index 87090da8693d..cd

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
> Are you sure? I thought that compression (and encryption) apply to the whole > file, including any Merkle tree blocks past i_size. This "dic" structure is only for "de"compression, so we don't need to worry about going beyond i_size case. > Also, even if you include the i_size check, it's stil

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
Eric, I have another question. I understand enabling the verity can be possible in the middle of I/O. Is the opposite way also possible? Actually, I couldn't find any disabling function of it, though. 2020년 12월 4일 (금) 오후 1:31, Daeho Jeong 님이 작성: > > > Are you sure? I thought th

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
ri, Dec 04, 2020 at 01:48:24PM +0900, Daeho Jeong wrote: > > Eric, > > > > I have another question. > > I understand enabling the verity can be possible in the middle of I/O. > > Is the opposite way also possible? Actually, I couldn't find any > > disabling fun

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
Thanks for the explanation about verity. I got your point. Thanks~ 2020년 12월 4일 (금) 오후 2:18, Eric Biggers 님이 작성: > > On Fri, Dec 04, 2020 at 02:00:34PM +0900, Daeho Jeong wrote: > > I think I don't understand how verity works. > > Right after verity is enabled on a fi

[PATCH v2] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
From: Daeho Jeong I found out f2fs_free_dic() is invoked in a wrong timing, but f2fs_verify_bio() still needed the dic info and it triggered the below kernel panic. It has been caused by the race condition of pending_pages value between decompression and verity logic, when the same compression

Re: [f2fs-dev] [PATCH v2] f2fs: fix race of pending_pages in decompression

2020-12-04 Thread Daeho Jeong
As I told, this patch has a bug. Ignore this one. So, I'm implementing another one. :( 2020년 12월 4일 (금) 오후 6:50, Daeho Jeong 님이 작성: > > As I told, this patch has a bug. Ignore this one. So, I'm implementing > another one. :( > > > 2020년 12월 4일 (금) 오후 5:04, Chao Yu 님이

Re: [f2fs-dev] [PATCH] f2fs: fix race of pending_pages in decompression

2020-12-04 Thread Daeho Jeong
Yep, we need to come back to v1 and enable verity in a unit of cluster. Plus, as I told you, I'll prevent newly verity enalbed pages from being merged with verity disabled bio. Thanks, 2020년 12월 5일 (토) 오전 3:29, Jaegeuk Kim 님이 작성: > > On 12/04, Daeho Jeong wrote: > > Thanks fo

[PATCH v3] f2fs: fix race of pending_pages in decompression

2020-12-04 Thread Daeho Jeong
From: Daeho Jeong I found out f2fs_free_dic() is invoked in a wrong timing, but f2fs_verify_bio() still needed the dic info and it triggered the below kernel panic. It has been caused by the race condition of pending_pages value between decompression and verity logic, when the same compression

Re: [f2fs-dev] [PATCH v3] f2fs: fix race of pending_pages in decompression

2020-12-06 Thread Daeho Jeong
> It looks like it will be better to move this into merge condition? > > if (bio && (!page_is_mergeable(sbi, bio, > *last_block_in_bio, blkaddr) || > !f2fs_crypt_mergeable_bio(bio, inode, page->index, NULL) > || >

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-25 Thread Daeho Jeong
gt; On 2020/11/23 11:17, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added two ioctl to decompress/compress explicitly the compression > > enabled file in "compress_mode=user-based" mount option. > > > > Using these two ioctls, the users can ma

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-25 Thread Daeho Jeong
return "false" to prevent compression write, so we don't use f2fs_write_compressed_pages() anymore in this case. Because of this, I manually updated i_compr_blocks. Do you have any suggestions on this? 2020년 11월 26일 (목) 오후 2:04, Daeho Jeong 님이 작성: > > Eric, > > do_pag

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: add compress_mode mount option

2020-12-02 Thread Daeho Jeong
Yep, you're right~ :) 2020년 12월 3일 (목) 오전 10:16, Chao Yu 님이 작성: > > On 2020/12/2 18:54, Daeho Jeong wrote: > > We might use compress_extension=*,compress_option=user. > > In this option, we're gonna allocate all the writes in cold zone. > > Oh, so all files i

Re: [f2fs-dev] [PATCH v7 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-12-02 Thread Daeho Jeong
backend_ready(inode)) > f2fs_warn(sbi, "compression algorithm is successfully set, " > "but current kernel doesn't support this algorithm."); > out: > -- > 2.26.2 > > > > > > On 2020/10/30 12:10, Dae

[PATCH v3] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-12-02 Thread Daeho Jeong
From: Daeho Jeong Added two ioctl to decompress/compress explicitly the compression enabled file in "compress_mode=user" mount option. Using these two ioctls, the users can make a control of compression and decompression of their files. Signed-off-by: Daeho Jeong --- v3: cha

[PATCH] f2fs: fix race of pending_pages in decompression

2020-12-03 Thread Daeho Jeong
From: Daeho Jeong I found out f2fs_free_dic() is invoked in a wrong timing, but f2fs_verify_bio() still needed the dic info and it triggered the below kernel panic. It has been caused by the race condition of pending_pages value between decompression and verity logic, when the same compression

Re: [f2fs-dev] [PATCH v3] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
We're going to use these just accumulating numbers and periodically gather and reset them. Yes, I will add the description like you suggested. Thanks, 2021년 3월 12일 (금) 오후 6:50, Chao Yu 님이 작성: > > On 2021/3/11 10:32, Daeho Jeong wrote: > > From: Daeho Jeong > > > >

[PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
From: Daeho Jeong I've added new sysfs nodes to show runtime compression stat since mount. compr_written_block - show the block count written after compression compr_saved_block - show the saved block count with compression compr_new_inode - show the count of inode newly enabled for compre

Re: [PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
e (0) I needed a protection here, because they might be updated in the race condition. 2021년 3월 12일 (금) 오후 9:39, Greg KH 님이 작성: > > On Fri, Mar 12, 2021 at 09:25:31PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > I've added new sysfs nodes to show runtime compres

Re: [PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
lock = 0; +blocks(3); + blocks(2); sbi->compr_written_block = 3; sbi->compr_written_block = 2; Finally, we end up with 2, not 5. As more threads are participating it, we might miss more counting. 2021년 3월 12일 (금) 오후 11:04, Greg KH 님이 작성: > > On Fri, Mar 12, 2021 at 10:5

Re: [PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
So, do you want we protect the values here with spin_lock and just read without spin_lock in sysfs read part? 2021년 3월 12일 (금) 오후 11:37, Daeho Jeong 님이 작성: > > As you can see, if we're doing like the below. > > sbi->compr_written_block += blocks; > > Let'

Re: [PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

2021-03-12 Thread Daeho Jeong
. > Q: What is the most annoying thing in e-mail? > > A: No. > Q: Should I include quotations after my reply? > > http://daringfireball.net/2007/07/on_top > Thanks for letting me know this! > > On Fri, Mar 12, 2021 at 11:37:29PM +0900, Daeho Jeong wrote: > > As you

[PATCH v5] f2fs: add sysfs nodes to get runtime compression stat

2021-03-15 Thread Daeho Jeong
From: Daeho Jeong I've added new sysfs nodes to show runtime compression stat since mount. compr_written_block - show the block count written after compression compr_saved_block - show the saved block count with compression compr_new_inode - show the count of inode newly enabled for compre

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-21 Thread Daeho Jeong
Oops, it disappeared while versioning up... 2021년 1월 21일 (목) 오후 7:30, Chao Yu 님이 작성: > > On 2021/1/14 14:23, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint > > merge daemon&#

[PATCH v3] f2fs: add sysfs nodes to get runtime compression stat

2021-03-10 Thread Daeho Jeong
From: Daeho Jeong I've added new sysfs nodes to show runtime compression stat since mount. compr_written_block - show the block count written after compression compr_saved_block - show the saved block count with compression compr_new_inode - show the count of inode newly enabled for compre

[PATCH v5 2/2] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-21 Thread Daeho Jeong
From: Daeho Jeong Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and

[PATCH v5 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-21 Thread Daeho Jeong
From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue caused by slow checkpoint

Re: [f2fs-dev] [PATCH v5 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-21 Thread Daeho Jeong
Got it~! :) 2021년 1월 22일 (금) 오전 9:55, Chao Yu 님이 작성: > > If there is no update in v5, it will be better to include my Reviewed-by > tag, please note that. :) > > Thanks, > > On 2021/1/21 21:45, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We'v

Re: [f2fs-dev] [PATCH v5 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-21 Thread Daeho Jeong
Yep~ 2021년 1월 22일 (금) 오전 10:46, Jaegeuk Kim 님이 작성: > > On 01/21, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint

Re: [f2fs-dev] [PATCH v2] f2fs: add sysfs nodes to get accumulated compression info

2021-03-09 Thread Daeho Jeong
2021년 3월 9일 (화) 오후 6:22, Chao Yu 님이 작성: > > On 2021/3/5 10:24, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added acc_compr_inodes to show accumulated compressed inode count and > > acc_compr_blocks to show accumulated secured block count with > > I

Re: [f2fs-dev] [PATCH v2] f2fs: add sysfs nodes to get accumulated compression info

2021-03-09 Thread Daeho Jeong
We've reconsidered this feature and decided to get just runtime info of them, not persistent on disk. I am re-writing it. Thanks, 2021년 3월 10일 (수) 오전 10:31, Chao Yu 님이 작성: > > On 2021/3/9 21:00, Daeho Jeong wrote: > > 2021년 3월 9일 (화) 오후 6:22, Chao Yu 님이 작성: > >> >

Re: [f2fs-dev] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2021-01-04 Thread Daeho Jeong
ollowing commit: > > commit 5fdb322ff2c2b4ad519f490dcb7ebb96c5439af7 > Author: Daeho Jeong > Date: Thu Dec 3 15:56:15 2020 +0900 > > f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE > > The analysis is as follows: > > 4025 static int redirty_blocks(str

[PATCH] f2fs: fix null page reference in redirty_blocks

2021-01-04 Thread Daeho Jeong
From: Daeho Jeong Fixed null page reference when find_lock_page() fails in redirty_blocks(). Signed-off-by: Daeho Jeong Reported-by: Colin Ian King Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE") --- fs/f2fs/file.c | 4 +++- 1 file changed, 3

Re: [f2fs-dev] [PATCH] f2fs: fix null page reference in redirty_blocks

2021-01-04 Thread Daeho Jeong
Yes, it's better~ :) 2021년 1월 5일 (화) 오전 10:44, Chao Yu 님이 작성: > > On 2021/1/5 9:28, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Fixed null page reference when find_lock_page() fails in > > redirty_blocks(). > > > > Signed-off-by: Daeho Je

[PATCH v2] f2fs: fix null page reference in redirty_blocks

2021-01-04 Thread Daeho Jeong
From: Daeho Jeong Fixed null page reference when find_lock_page() fails in redirty_blocks(). Signed-off-by: Daeho Jeong Reported-by: Colin Ian King Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE") --- v2: changed error value and break the loop

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-15 Thread Daeho Jeong
2021년 1월 15일 (금) 오후 6:22, Chao Yu 님이 작성: > > On 2021/1/14 14:23, Daeho Jeong wrote: > > From: Daeho Jeong > > > > We've added a new mount option "checkpoint=merge", which creates a > > kernel daemon and makes it to merge concurrent checkpoint

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-15 Thread Daeho Jeong
2021년 1월 15일 (금) 오후 11:00, Daeho Jeong 님이 작성: > > 2021년 1월 15일 (금) 오후 6:22, Chao Yu 님이 작성: > > > > On 2021/1/14 14:23, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > We've added a new mount option "checkpoint=merge", which cr

[PATCH v3] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-15 Thread Daeho Jeong
From: Daeho Jeong Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint merge daemon's io priority. Its default value is "be,3", which means "BE" I/O class and I/O priority "3". We can select the class between "rt" and

Re: [PATCH v3] f2fs: add ckpt_thread_ioprio sysfs node

2021-01-15 Thread Daeho Jeong
Sorry, ignore this. I've sent this wrong. :( 2021년 1월 16일 (토) 오전 9:58, Daeho Jeong 님이 작성: > > From: Daeho Jeong > > Added "ckpt_thread_ioprio" sysfs node to give a way to change checkpoint > merge daemon's io priority. Its default value is "be,3", whi

[PATCH v3 1/2] f2fs: introduce checkpoint=merge mount option

2021-01-15 Thread Daeho Jeong
From: Daeho Jeong We've added a new mount option "checkpoint=merge", which creates a kernel daemon and makes it to merge concurrent checkpoint requests as much as possible to eliminate redundant checkpoint issues. Plus, we can eliminate the sluggish issue caused by slow checkpoint

Re: [f2fs-dev] [PATCH v2] f2fs: fix null page reference in redirty_blocks

2021-01-05 Thread Daeho Jeong
Got it~ Thanks, 2021년 1월 5일 (화) 오후 9:06, Markus Elfring 님이 작성: > > > Fixed null page reference when find_lock_page() fails in > > redirty_blocks(). > > I suggest to choose an other imperative wording for this change description. > > See also: > https://git.kernel.org/pub/scm/linux/kernel/git/torv

[PATCH v2] f2fs: fix null page reference in redirty_blocks

2021-01-05 Thread Daeho Jeong
From: Daeho Jeong By Colin's static analysis, we found out there is a null page reference under low memory situation in redirty_blocks. I've made the page finding loop stop immediately and return an error not to cause further memory pressure when we run into a failure to find a page

Re: [f2fs-dev] [PATCH v2] f2fs: fix null page reference in redirty_blocks

2021-01-05 Thread Daeho Jeong
Thanks for the notice~ 2021년 1월 6일 (수) 오전 10:04, Chao Yu 님이 작성: > > Daeho, > > FYI > > https://www.spinics.net/lists/kernel/msg3595944.html > > On 2021/1/5 20:04, Markus Elfring wrote: > >> Fixed null page reference when find_lock_page() fails in > >> redirty_blocks(). > > > > I suggest to choose

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-26 Thread Daeho Jeong
misaligned reads reading more pages in advance. Thanks, 2020년 11월 27일 (금) 오전 2:49, Eric Biggers 님이 작성: > > On Thu, Nov 26, 2020 at 02:04:41PM +0900, Daeho Jeong wrote: > > Eric, > > > > do_page_cache_ra() is defined in mm/internal.h for internal use > > between in mm, so we

Re: [f2fs-dev] [PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-26 Thread Daeho Jeong
Re-thinking about this, page_cache_sync_readahead() is not good for our situation, it might end up with cluster misaligned reads which trigger internal duplicated cluster reads. 2020년 11월 27일 (금) 오전 8:46, Daeho Jeong 님이 작성: > > Chao, > > Got it~ > > Eric, > > Actually

Re: [f2fs-dev] [PATCH] f2fs: add compr_inode and compr_blocks sysfs nodes

2020-11-29 Thread Daeho Jeong
Sure, but I don't think we need to expose compr_inode and compr_block right now. 2020년 11월 27일 (금) 오후 6:44, Chao Yu 님이 작성: > > Daeho, > > How about updating this patch based on below patch? > > f2fs: introduce a new per-sb directory in sysfs > > On 2020/1

[PATCH 1/2] f2fs: add compress_mode mount option

2020-11-22 Thread Daeho Jeong
From: Daeho Jeong We will add a new "compress_mode" mount option to control file compression mode. This supports "fs-based" and "user-based". In "fs-based" mode (default), f2fs does automatic compression on the compression enabled files. In "

[PATCH 2/2] f2fs: add F2FS_IOC_DECOMPRESS_FILE and F2FS_IOC_COMPRESS_FILE

2020-11-22 Thread Daeho Jeong
From: Daeho Jeong Added two ioctl to decompress/compress explicitly the compression enabled file in "compress_mode=user-based" mount option. Using these two ioctls, the users can make a control of compression and decompression of their files. Signed-off-by: Daeho Jeong --- fs/f

Re: [PATCH 3.2 16/52] ext4, jbd2: ensure entering into panic after recording an error in superblock

2015-11-26 Thread Daeho Jeong
know. -- From: Daeho Jeong commit 4327ba52afd03fc4b5afa0ee1d774c9c5b0e85c5 upstream. If a EXT4 filesystem utilizes JBD2 journaling and an error occurs, the journaling will be aborted first and the error number will be recorded into JBD2 superblock and, finally, the system will

Question about percpu_free_rwsem function

2016-03-06 Thread Daeho Jeong
Hi, I got a trouble while I am developing a patch for EXT4 filesytem. Actually, I used a percpu rw semaphore in my patch and there was no problem when I built EXT4 filesystem as built-in mode. However, when kbuild auto build robot built EXT4 filesystem with my patch as a "module", a bulid error oc

Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl

2020-06-10 Thread Daeho Jeong
e mnt_want_write_file() handles all the things we need. It checks FMODE_WRITER, which is set in do_dentry_open() when FMODE_WRITE is already set, and does the stuff that file_start_write() is doing. This is why the other filesystem system calls use it. What do you think? 2020년 6월 10일 (수) 오후 12:5

Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl

2020-06-10 Thread Daeho Jeong
for write already. in ext4/ioctl.c case EXT4_IOC_SWAP_BOOT: { int err; if (!(filp->f_mode & FMODE_WRITE)) return -EBADF; err = mnt_want_write_file(filp); if (err) return err;2

Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl

2020-06-10 Thread Daeho Jeong
목) 오전 9:00, Eric Biggers 님이 작성: > > On Thu, Jun 11, 2020 at 08:53:10AM +0900, Daeho Jeong wrote: > > > > > > Using FMODE_WRITE is more proper for this case, since we're going to > > > > > > modify the data. But I think mnt_want_write_file() is still req

Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl

2020-06-10 Thread Daeho Jeong
Ok, I got it. Thanks for quick response~ :) 2020년 6월 11일 (목) 오전 10:56, Eric Biggers 님이 작성: > > On Thu, Jun 11, 2020 at 09:23:23AM +0900, Daeho Jeong wrote: > > Yes, I saw the implementation in vfs_write(). > > But if we use mnt_want_write_file() here, it'll call mnt_clone

[PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl

2020-06-10 Thread Daeho Jeong
From: Daeho Jeong Added a new ioctl to send discard commands or/and zero out to whole data area of a regular file for security reason. Signed-off-by: Daeho Jeong --- fs/f2fs/f2fs.h | 8 +++ fs/f2fs/file.c | 143 + 2 files changed, 151

  1   2   3   >