[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 compression

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

2021-03-12 Thread Daeho Jeong
posting. > 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

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's assume t

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

2021-03-12 Thread Daeho Jeong
+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:56:13PM +09

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

2021-03-12 Thread Daeho Jeong
tion 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 compression stat since moun

[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 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 > > > > I'

[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 compression

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] [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 > &g

[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 J

[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 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 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

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 > > need to

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

2021-02-02 Thread Daeho Jeong
ta" 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 Yu 님이 작성:

[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 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't

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

2021-02-02 Thread Daeho Jeong
e 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 to u

[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] 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

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
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

[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

[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

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 reque

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've add

[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 oper

[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

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's

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 wrote: >

[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 oper

[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 oper

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", which means &

[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: [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 creates

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 reque

[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 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 oper

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 reque

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 reque

[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 oper

[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

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

[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 under low

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: >

[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] 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 Jeong

[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] 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

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"

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

2020-12-07 Thread Daeho Jeong
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 needed

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) > || >

[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] 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 for the

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 님이 작성: >&g

[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] 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 file, i

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

2020-12-03 Thread Daeho Jeong
, 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 function of i

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 that co

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

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

[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

[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

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

2020-12-02 Thread Daeho Jeong
nd_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, Daeho Jeong w

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 in data

[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] 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/10/22

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, > > Actu

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

2020-11-26 Thread Daeho Jeong
for the 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-25 Thread Daeho Jeong
eturn "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_page_cach

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

2020-11-25 Thread Daeho Jeong
: > > 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

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 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
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

[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

[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-16 Thread Daeho Jeong
From: Daeho Jeong Added two ioctl to decompress/compress explicitly the compression enabled file in disable_auto_compr 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/f2fs/f2fs.h | 10

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

2020-11-16 Thread Daeho Jeong
From: Daeho Jeong We will add a new disable_auto_compr mount option to turn off the automaic compression on the compression enabled file, in order to give discretion of choosing the target file and the timing of compression to the user. Signed-off-by: Daeho Jeong --- Documentation/filesystems

[PATCH v2] f2fs_io: add get/set compression option

2020-11-03 Thread Daeho Jeong
From: Daeho Jeong Added new commands, get_coption and set_coption, to support F2FS_IOC_GET_COMPRESS_OPTION and F2FS_IOC_SET_COMPRESS_OPTION. Signed-off-by: Daeho Jeong --- v2: changed the file open option of set_coption to write only. --- tools/f2fs_io/f2fs_io.c | 61

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

2020-11-01 Thread Daeho Jeong
Oh, even if those are patchset, then I have to send just changed ones? Got it. 2020년 10월 30일 (금) 오후 3:13, Chao Yu 님이 작성: > > Daeho, > > If there is no change, we are used to not resend the patch with updated > version. > > Thanks, > > On 2020/10/30 12:10, Daeho Jeong w

[PATCH v7 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale clu

[PATCH v7 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scal

Re: [f2fs-dev] [PATCH v5 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
Opps, I missed this. We need v7... lol 2020년 10월 30일 (금) 오전 11:37, Chao Yu 님이 작성: > > On 2020/10/29 15:24, Chao Yu wrote: > > On 2020/10/29 12:15, Daeho Jeong wrote: > > >> +inode_lock(inode); > > > > It's minor, > > > > inode_lock_shared()

[PATCH v6 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale clu

[PATCH v6 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scal

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

2020-10-29 Thread Daeho Jeong
Chao, got it on f2fs_is_compress_algorithm_valid(). I also agree on Eric's opinion on that error value. 2020년 10월 30일 (금) 오전 12:54, Eric Biggers 님이 작성: > > On Thu, Oct 29, 2020 at 03:29:17PM +0800, Chao Yu wrote: > > > +static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long > >

[PATCH v5 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale clu

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

2020-10-29 Thread Daeho Jeong
f2fs_cops is a static variable. Do you wanna change this to global variable (extern)? 2020년 10월 29일 (목) 오후 4:29, Chao Yu 님이 작성: > > On 2020/10/29 12:15, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file > >

[PATCH v5 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-29 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scal

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

2020-10-28 Thread Daeho Jeong
Chao, Do you want to print out a kernel warning message in this case? like "XX compression algorithm is set for this inode, but current mount option doesn't support this algorithm."? 2020년 10월 28일 (수) 오후 3:47, Chao Yu 님이 작성: > > On 2020/10/27 13:38, Daeho Jeong wrote: >

[PATCH v4 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-26 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scal

[PATCH v4 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-26 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale clu

Re: [PATCH v3 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-26 Thread Daeho Jeong
Oops, typos... 2020년 10월 27일 (화) 오전 8:43, Daeho Jeong 님이 작성: > > Oops, typos... > > On Tue, Oct 27, 2020 at 8:27 AM Eric Biggers wrote: >> >> On Tue, Oct 27, 2020 at 08:18:44AM +0900, Daeho Jeong wrote: >> > I checked that. We seem to need to complement missing

Re: [PATCH v3 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-26 Thread Daeho Jeong
I checked that. We seem to need to complement missing parts including other ioctls in Documentation/filesystems/fscrypt.rst. Thanks~ 2020년 10월 27일 (화) 오전 8:05, Eric Biggers 님이 작성: > > On Tue, Oct 27, 2020 at 08:02:18AM +0900, Daeho Jeong wrote: > > I thought I gave the infor

Re: [PATCH v3 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-26 Thread Daeho Jeong
I thought I gave the information about that in the commit message. Is this not enough for you? Actually, there is no space for F2FS ioctl documentation now. :( 2020년 10월 27일 (화) 오전 4:04, Eric Biggers 님이 작성: > > On Mon, Oct 26, 2020 at 01:16:55PM +0900, Daeho Jeong wrote: > > From:

[PATCH v3 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-25 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_SET_COMPRESS_OPTION ioctl to change file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scal

[PATCH v3 1/2] f2fs: add F2FS_IOC_GET_COMPRESS_OPTION ioctl

2020-10-25 Thread Daeho Jeong
From: Daeho Jeong Added a new F2FS_IOC_GET_COMPRESS_OPTION ioctl to get file compression option of a file. struct f2fs_comp_option { u8 algorithm; => compression algorithm => 0:lzo, 1:lz4, 2:zstd, 3:lzorle u8 log_cluster_size; => log scale clu

Re: [PATCH v2 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-23 Thread Daeho Jeong
Yep, sure~! 2020년 10월 23일 (금) 오후 9:00, Dan Carpenter 님이 작성: > > Hi Daeho, > > url: > https://github.com/0day-ci/linux/commits/Daeho-Jeong/f2fs-add-F2FS_IOC_GET_COMPRESS_OPTION-ioctl/20201022-115947 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git &

  1   2   3   >