Re: [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-21 Thread Jaegeuk Kim
On 12/21, Avri Altman wrote: > > > > > > On 12/21, Avri Altman wrote: > > > > > > When gate_work/ungate_work gets an error during hibern8_enter or > > > > exit, > > > > > > ufshcd_err_handler() > > > > > >ufshcd_scsi_block_requests() > > > > > >ufshcd_reset_and_restore() > > > > > >

Re: [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-21 Thread Jaegeuk Kim
On 12/21, Avri Altman wrote: > > > > When gate_work/ungate_work gets an error during hibern8_enter or > > exit, > > > > ufshcd_err_handler() > > > >ufshcd_scsi_block_requests() > > > >ufshcd_reset_and_restore() > > > > ufshcd_clear_ua_wluns() -> stuck > > > >

Re: [PATCH v2] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-21 Thread Jaegeuk Kim
per recovery flows such as suspend/resume, link_recovery, and error_handler. Fixes: 1918651f2d7e ("scsi: ufs: Clear UAC for RPMB after ufshcd resets") Signed-off-by: Jaegeuk Kim --- Change log from v1: - add condition check to call - add Fixes tag drivers/scsi/ufs/ufshcd.c | 15 +

Re: [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-21 Thread Jaegeuk Kim
Hi, On 12/20, Avri Altman wrote: > Hi J, > > > > > When gate_work/ungate_work gets an error during hibern8_enter or exit, > > ufshcd_err_handler() > >ufshcd_scsi_block_requests() > >ufshcd_reset_and_restore() > > ufshcd_clear_ua_wluns() -> stuck > >

Re: [PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-21 Thread Jaegeuk Kim
On 12/21, Can Guo wrote: > On 2020-12-18 11:31, Jaegeuk Kim wrote: > > When gate_work/ungate_work gets an error during hibern8_enter or exit, > > ufshcd_err_handler() > >ufshcd_scsi_block_requests() > >ufshcd_reset_and_restore() > >

Re: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-18 Thread Jaegeuk Kim
t; + " without the compression enable (-c) option\n" > > + ); > > + error_out(prog); > > + } > > + if (err == NOERROR && c.sldc_en) { > > + c.sldc_cc.cluster

[PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2020-12-17 Thread Jaegeuk Kim
per recovery flows such as suspend/resume, link_recovery, and error_handler. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index e221add25a7e..e711def82

Re: [PATCH] f2fs-tools: man page fix for sload compression

2020-12-17 Thread Jaegeuk Kim
les. > +It allows filesystem to release compressed space to the users, since, without > +this option, filesystem should keep the space for future file updates. > +This option must be used with option \fB\-c\fR. > + > +.SH NOTES > +If neither \fB\-i\fR nor \fB\-x\fR is used, all fi

[GIT PULL] f2fs update for 5.11-rc1

2020-12-16 Thread Jaegeuk Kim
): f2fs: fix double free of unicode map Jack Qiu (3): f2fs: init dirty_secmap incorrectly f2fs: inline: correct comment in f2fs_recover_inline_data f2fs: inline: fix wrong inline inode stat Jaegeuk Kim (8): f2fs: call f2fs_get_meta_page_retry for nat page f2fs: rename

Re: [PATCH] scsi: ufs: fix livelock on ufshcd_clear_ua_wlun

2020-12-16 Thread Jaegeuk Kim
On 12/17, Stanley Chu wrote: > Hi Jaegeuk, > > On Wed, 2020-12-16 at 11:02 -0800, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > This fixes the below livelock which is caused by calling a scsi command > > before > > ufshcd_scsi_unblock_requests() in u

[PATCH] scsi: ufs: fix livelock on ufshcd_clear_ua_wlun

2020-12-16 Thread Jaegeuk Kim
From: Jaegeuk Kim This fixes the below livelock which is caused by calling a scsi command before ufshcd_scsi_unblock_requests() in ufshcd_ungate_work(). Workqueue: ufs_clk_gating_0 ufshcd_ungate_work Call trace: __switch_to+0x298/0x2bc __schedule+0x59c/0x760 schedule+0xac/0xf0

Re: [PATCH] scsi: ufs: fix memory boundary check for UFS 3.0

2020-12-11 Thread Jaegeuk Kim
On 12/11, Eric Biggers wrote: > On Fri, Dec 11, 2020 at 11:38:14AM -0800, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > If param_offset is greater than what UFS supports, it'll give kernel panic. > > > > Signed-off-by: Jaegeuk Kim > > Change-Id: I4

[PATCH] scsi: ufs: fix memory boundary check for UFS 3.0

2020-12-11 Thread Jaegeuk Kim
From: Jaegeuk Kim If param_offset is greater than what UFS supports, it'll give kernel panic. Signed-off-by: Jaegeuk Kim Change-Id: I48ea6f3f3074bd42abf4ecf8be87806732f3e6a3 --- drivers/scsi/ufs/ufshcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b

Re: [PATCH RFC] f2fs: compress: add compress_flag in struct f2fs_comp_option

2020-12-10 Thread Jaegeuk Kim
On 12/10, Chao Yu wrote: > Add a extra field compress_flag to get/set more compress option from/to > compressed inode. > > Signed-off-by: Chao Yu > --- > > Daeho, Jaegeuk, > > Could you please check whether we could add this new field to struct > f2fs_comp_option? so we can expand to allow

Re: [f2fs-dev] [PATCH] fs: f2fs: fix potential shift-out-of-bounds error in sanity_check_raw_super()

2020-12-10 Thread Jaegeuk Kim
On 12/10, Chao Yu wrote: > Jaegeuk, > > Could you please help to add signed-off of Anant manually in > > f2fs: fix shift-out-of-bounds in sanity_check_raw_super() Done. Thank you guys. :) > > Thanks, > > On 2020/12/10 10:14, Anant Thazhemadam wrote: > > > > On 10/12/20 7:40 am, Chao Yu

Re: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-10 Thread Jaegeuk Kim
Chao and Robin, I refactored the patch to modify the names and structures. Please take a look at this. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/commit/?h=dev=5cd8e5fcc79611c0692f18c7e7e13d6b4742d3c0 On 12/10, Jaegeuk Kim wrote: > On 12/10, 徐瑞斌 wrote: > > Hi

Re: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-10 Thread Jaegeuk Kim
On 12/10, 徐瑞斌 wrote: > Hi, Jaegeuk, > > I comment here the patch your provided (3 parts, since the patch contains 3 > fixes): > 1. + dn->data_blkaddr = blkaddr; > ret = reserve_new_block(sbi, >data_blkaddr, , type, 0); > > We cannot assign dn->data_blkaddr here. The old one is to

Re: [PATCH RESEND v2 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2020-12-09 Thread Jaegeuk Kim
On 12/10, Chao Yu wrote: > Hi Daeho, Jaegeuk > > I found one missing place in this patch which should adapt > "compress vs verity race bugfix" > > Could you please check and apply below diff? Applied. > > From 61a9812944ac2f6f64fb458d5ef8b662c007bc50 Mon Sep 17 00:00:00 2001 > From: Chao Yu

Re: [PATCH RESEND v2 5/5] f2fs: introduce sb_status sysfs node

2020-12-09 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > Introduce /sys/fs/f2fs//stat/sb_status to show superblock > status in real time as below: > > IS_DIRTY: no > IS_CLOSE: no > IS_SHUTDOWN: no > IS_RECOVERED: no > IS_RESIZEFS: no > NEED_FSCK:no > POR_DOING:

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

2020-12-09 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > On 2020/12/3 14:56, Daeho Jeong wrote: > > From: Daeho Jeong > > + f2fs_balance_fs(F2FS_I_SB(inode), true); > > Trivial cleanup: > > f2fs_balance_fs(sbi, true); > > > + f2fs_balance_fs(F2FS_I_SB(inode), true); > > Ditto, > > Jaegeuk could fix this directly?

Re: [f2fs-dev] [PATCH v4] f2fs: compress: support chksum

2020-12-09 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > On 2020/12/9 12:28, Chao Yu wrote: > > On 2020/12/9 11:54, Jaegeuk Kim wrote: > > > Ah, could you please write another patch to adjust the new changes? > > > > No problem, will drop "f2fs: compress:support chksum" based on

Re: [PATCH v4] f2fs: compress: support chksum

2020-12-08 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > On 2020/12/9 10:49, Jaegeuk Kim wrote: > > On 12/09, Chao Yu wrote: > > > Hello guys, > > > > > > Any further comments on compress related patches? > > > > > > Jaegeuk, could you please queue these patches

Re: [PATCH v4] f2fs: compress: support chksum

2020-12-08 Thread Jaegeuk Kim
On 12/09, Chao Yu wrote: > Hello guys, > > Any further comments on compress related patches? > > Jaegeuk, could you please queue these patches in dev-test? let me know > if there is any problem. Chao, could you please rebase and post them in a series? I lost the patch order and got some

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

2020-12-08 Thread Jaegeuk Kim
On 12/07, Eric Biggers wrote: > On Tue, Dec 08, 2020 at 08:51:45AM +0900, Daeho Jeong wrote: > > > I am trying to review this but it is very hard, as the f2fs compression > > > code is > > > very hard to understand. > > > > > > It looks like a 'struct decompress_io_ctx' represents the work to >

Re: [PATCH v2] scsi: ufs: clear uac for RPMB after ufshcd resets

2020-12-08 Thread Jaegeuk Kim
nse to clear uac in ufshcd reset flow. Signed-off-by: Randall Huang Signed-off-by: Leo Liou Signed-off-by: Jaegeuk Kim --- v2: - fix build warning drivers/scsi/ufs/ufshcd.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/driv

Re: [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-08 Thread Jaegeuk Kim
" cluster, i.e. %d\n", > + c.sldc_cc.cluster_size - 1); > + error_out(prog); > + } > + qbuf_init(); > + } > #endif /* WITH_SLOAD */ >

Re: [f2fs-dev] [PATCH v3] f2fs: compress: support chksum

2020-12-07 Thread Jaegeuk Kim
On 12/08, Chao Yu wrote: > On 2020/12/8 4:37, Eric Biggers wrote: > > On Thu, Nov 26, 2020 at 06:32:09PM +0800, Chao Yu wrote: > > > + if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { > > > > This really could use some parentheses. People shouldn't have to look up a > > C operator

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

2020-12-07 Thread Jaegeuk Kim
On 12/07, Chao Yu wrote: > On 2020/12/7 15:28, Daeho Jeong wrote: > > > 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) || > > >

Re: [PATCH v2 3/3] f2fs-tools:sload.f2fs compress: Fixed automake

2020-12-07 Thread Jaegeuk Kim
On 12/07, Robin Hsu wrote: > From: Robin Hsu > > Fixed automake for sload.f2fs compression support > > ./configure now will by default depends on liblzo2 and liblz4. > > To compile without liblzo2 (and thus not support liblzo2 compression), > run ./configure with '--without-lzo2' option. > >

Re: [PATCH] f2fs: introduce a new per-sb directory in sysfs

2020-12-05 Thread Jaegeuk Kim
On 12/05, Chao Yu wrote: > On 2020/12/5 2:23, Jaegeuk Kim wrote: > > On 12/03, Chao Yu wrote: > > > Jaegeuk, > > > > > > Can you comment on this patch? > > > > Waiting for use-case? :) > > How do you think of duplicating below stats into /

Re: [PATCH v5] f2fs: compress: add compress_inode to cache compressed blocks

2020-12-04 Thread Jaegeuk Kim
Chao, could you please rebase this patch? Thanks, On 12/02, Chao Yu wrote: > From: Chao Yu > > Support to use address space of inner inode to cache compressed block, > in order to improve cache hit ratio of random read. > > Signed-off-by: Chao Yu > --- > v5: > - rebase to last dev branch. >

Re: [PATCH v7] f2fs: compress: support compress level

2020-12-04 Thread Jaegeuk Kim
On 12/04, Chao Yu wrote: > Expand 'compress_algorithm' mount option to accept parameter as format of > :, by this way, it gives a way to allow user to do more > specified config on lz4 and zstd compression level, then f2fs compression > can provide higher compress ratio. > > In order to set

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

2020-12-04 Thread Jaegeuk Kim
On 12/04, Daeho Jeong wrote: > Thanks for the explanation about verity. > I got your point. Thanks~ Possible fix can be like this? --- fs/f2fs/compress.c | 2 -- fs/f2fs/data.c | 19 +-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/compress.c

Re: [PATCH] f2fs: introduce a new per-sb directory in sysfs

2020-12-04 Thread Jaegeuk Kim
On 12/03, Chao Yu wrote: > Jaegeuk, > > Can you comment on this patch? Waiting for use-case? :) > > On 2020/11/27 17:01, Chao Yu wrote: > > Add a new directory 'stat' in path of /sys/fs/f2fs//, later > > we can add new readonly stat sysfs file into this directory, it will > > make directory

[PATCH 2/2] f2fs: introduce max_io_bytes, a sysfs entry, to limit bio size

2020-12-03 Thread Jaegeuk Kim
This patch adds max_io_bytes to limit bio size when f2fs tries to merge consecutive IOs. This can give a testing point to split out bios and check end_io handles those bios correctly. This is used to capture a recent bug on the decompression and fsverity flow. Signed-off-by: Jaegeuk Kim

[PATCH 1/2] f2fs: don't allow any writes on readonly mount

2020-12-03 Thread Jaegeuk Kim
el0_svc_handler+0x60/0x6c el0_svc+0x8/0xc Signed-off-by: Jaegeuk Kim --- fs/f2fs/inline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 92e9852d316a..d09a0bdc0197 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -188,7 +188,8

Re: [f2fs-dev] [PATCH v3] f2fs: avoid race condition for shinker count

2020-12-03 Thread Jaegeuk Kim
On 12/03, Chao Yu wrote: > On 2020/12/3 14:07, Jaegeuk Kim wrote: > > On 11/11, Jaegeuk Kim wrote: > > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > > > wrong do_shinker work. Let's avoid to get stale data by using > > &g

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

2020-12-02 Thread Jaegeuk Kim
On 12/02, Jaegeuk Kim wrote: > On 12/03, Chao Yu wrote: > > Jaegeuk, not sure, is it too late to merge this cleanup into original patch? > > Let me merge this on top of tree. Thanks. :) I integrated this into the original patch since I had to revise this commit. :( ("f2fs:

Re: [f2fs-dev] [PATCH v3] f2fs: avoid race condition for shinker count

2020-12-02 Thread Jaegeuk Kim
On 11/11, Jaegeuk Kim wrote: > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > wrong do_shinker work. Let's avoid to get stale data by using nat_tree_lock. > > Reported-by: Light Hsieh > Signed-off-by: Jaegeuk Kim > --- > v3: > - fix to

Re: [PATCH v5] f2fs: compress: support compress level

2020-12-02 Thread Jaegeuk Kim
On 12/03, Chao Yu wrote: > Expand 'compress_algorithm' mount option to accept parameter as format of > :, by this way, it gives a way to allow user to do more > specified config on lz4 and zstd compression level, then f2fs compression > can provide higher compress ratio. > > In order to set

Re: linux-next: Fixes tag needs some work in the f2fs tree

2020-12-02 Thread Jaegeuk Kim
On 12/02, Stephen Rothwell wrote: > Hi all, > > In commit > > 32c202c563c7 ("f2fs: init dirty_secmap incorrectly") > > Fixes tag > > Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section > > has these problem(s): > > - Subject has leading but no trailing parentheses

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

2020-12-02 Thread Jaegeuk Kim
On 12/03, Chao Yu wrote: > Jaegeuk, not sure, is it too late to merge this cleanup into original patch? Let me merge this on top of tree. Thanks. :) > > From a5c63ec58e0cda6eb5d186b46942eea46422b7a9 Mon Sep 17 00:00:00 2001 > From: Chao Yu > Date: Thu, 3 Dec 2020 10:04:26 +0800 > Subject:

[PATCH] scsi: ufs: clear uac for RPMB after ufshcd resets

2020-11-30 Thread Jaegeuk Kim
From: Randall Huang If RPMB is not provisioned, we may see RPMB failure after UFS suspend/resume. Inject request_sense to clear uac in ufshcd reset flow. Signed-off-by: Randall Huang Signed-off-by: Leo Liou Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 12 1 file

Re: [PATCH 3/4] f2fs: fix wrong block count instead of bytes

2020-11-30 Thread Jaegeuk Kim
On 11/25, Jaegeuk Kim wrote: > We should convert cur_lblock, a block count, to bytes for len. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/data.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c > index

Re: [PATCH 2/4] f2fs: use new conversion functions between blks and bytes

2020-11-30 Thread Jaegeuk Kim
On 11/25, Jaegeuk Kim wrote: > This patch cleans up blks and bytes conversions. > > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/data.c | 46 +- > 1 file changed, 21 insertions(+), 25 deletions(-) > > diff --git a/fs/f2fs

Re: [PATCH 4/4] f2fs: remove buffer_head which has 32bits limit

2020-11-30 Thread Jaegeuk Kim
On 11/25, Jaegeuk Kim wrote: > This patch removes buffer_head dependency when getting block addresses. > Light reported there's a 32bit issue in f2fs_fiemap where map_bh.b_size is > 32bits while len is 64bits given by user. This will give wrong length to > f2fs_map_block. > >

Re: [PATCH 1/4] f2fs: rename logical_to_blk and blk_to_logical

2020-11-30 Thread Jaegeuk Kim
Forgot to add f2fs mailing list. On 11/25, Jaegeuk Kim wrote: > This patch renames two functions like below having u64. > - logical_to_blk to bytes_to_blks > - blk_to_logical to blks_to_bytes > > Signed-off-by: Jaegeuk Kim > --- >

[PATCH 3/4] f2fs: fix wrong block count instead of bytes

2020-11-25 Thread Jaegeuk Kim
We should convert cur_lblock, a block count, to bytes for len. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index a84e5bc09337..e49c14ccfafe 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c

[PATCH 2/4] f2fs: use new conversion functions between blks and bytes

2020-11-25 Thread Jaegeuk Kim
This patch cleans up blks and bytes conversions. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 46 +- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index a8612c6f40ab..a84e5bc09337 100644 --- a/fs

[PATCH 1/4] f2fs: rename logical_to_blk and blk_to_logical

2020-11-25 Thread Jaegeuk Kim
This patch renames two functions like below having u64. - logical_to_blk to bytes_to_blks - blk_to_logical to blks_to_bytes Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/fs/f2fs

[PATCH 4/4] f2fs: remove buffer_head which has 32bits limit

2020-11-25 Thread Jaegeuk Kim
This patch removes buffer_head dependency when getting block addresses. Light reported there's a 32bit issue in f2fs_fiemap where map_bh.b_size is 32bits while len is 64bits given by user. This will give wrong length to f2fs_map_block. Reported-by: Light Hsieh Signed-off-by: Jaegeuk Kim --- fs

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

2020-11-23 Thread Jaegeuk Kim
On 11/23, 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 make a control of compression > and decompression of their files. > >

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

2020-11-23 Thread Jaegeuk Kim
On 11/23, Daeho Jeong wrote: > 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 "user-based"

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

2020-11-17 Thread Jaegeuk Kim
On 11/17, Daeho Jeong wrote: > 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. The aim would be

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Jaegeuk Kim
On 11/17, Theodore Y. Ts'o wrote: > On Tue, Nov 17, 2020 at 04:03:14AM +, Daniel Rosenberg wrote: > > This shifts the responsibility of setting up dentry operations from > > fscrypt to the individual filesystems, allowing them to have their own > > operations while still setting fscrypt's

Re: [PATCH] scsi: ufs: show lba and length for unmap commands

2020-11-17 Thread Jaegeuk Kim
On 11/16, Martin K. Petersen wrote: > > Hi Jaegeuk! > > > From: Leo Liou > > > > We have lba and length for unmap commands. > > > > Signed-off-by: Leo Liou > > Doesn't apply to 5.11/scsi-queue. > > Also needs a Signed-off-by: tag from you. Hi Martin, Could you please consider this patch

[PATCH v5 4/7] scsi: ufs: use WQ_HIGHPRI for gating work

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim Must have WQ_MEM_RECLAIM ``WQ_MEM_RECLAIM`` All wq which might be used in the memory reclaim paths **MUST** have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Signed-off-by: Jaegeuk Kim Reviewed-by: Asutosh

[PATCH v5 1/7] scsi: ufs: avoid to call REQ_CLKS_OFF to CLKS_OFF

2020-11-17 Thread Jaegeuk Kim
Once UFS was gated with CLKS_OFF, it should not call REQ_CLKS_OFF again, which caused hibern8_enter failure. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v5 3/7] scsi: ufs: clear UAC for FFU and RPMB LUNs

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim In order to conduct FFU or RPMB operations, UFS needs to clear UAC. This patch clears it explicitly, so that we could get no failure given early execution. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 70 +++ drivers/scsi/ufs

[PATCH v5 7/7] scsi: ufs: show lba and length for unmap commands

2020-11-17 Thread Jaegeuk Kim
From: Leo Liou We have lba and length for unmap commands. Signed-off-by: Leo Liou Reviewed-by: Stanley Chu Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v5 0/5] scsi: ufs: add some fixes

2020-11-17 Thread Jaegeuk Kim
Change log from v4: - add more fixes Change log from v3: - use __ufshcd_release with a fix in __ufshcd_release Change log from v2: - use active_req-- instead of __ufshcd_release to avoid UFS timeout Change log from v1: - remove clkgating_enable check in __ufshcd_release - use

[PATCH v5 2/7] scsi: ufs: atomic update for clkgating_enable

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim When giving a stress test which enables/disables clkgating, we hit device timeout sometimes. This patch avoids subtle racy condition to address it. Note that, this requires a patch to address the device stuck by REQ_CLKS_OFF in __ufshcd_release(). The fix is "scsi: ufs:

[PATCH v5 6/7] scsi: ufs: fix clkgating on/off correctly

2020-11-17 Thread Jaegeuk Kim
by the check of ufshcd_any_tag_in_use() in gate_work. Fixes: 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Signed-off-by: Jaegeuk Kim Reviewed-by: Asutosh Das Reviewed-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH v5 5/7] scsi: add more contexts in the ufs tracepoints

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Signed-off-by: Jaegeuk Kim Reviewed-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 6 -- include/trace/events/ufs.h | 21 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/scsi

Re: [f2fs-dev] [PATCH v3] f2fs: avoid race condition for shinker count

2020-11-17 Thread Jaegeuk Kim
On 11/12, Chao Yu wrote: > On 2020/11/12 13:40, Jaegeuk Kim wrote: > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > > wrong do_shinker work. Let's avoid to get stale data by using nat_tree_lock. > > > > Reported-by: Light Hsieh

[PATCH] scsi: ufs: show lba and length for unmap commands

2020-11-12 Thread Jaegeuk Kim
From: Leo Liou We have lba and length for unmap commands. Signed-off-by: Leo Liou --- drivers/scsi/ufs/ufshcd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 86c8dee01ca9..dba3ee307307 100644 ---

Re: [PATCH v2] f2fs: avoid race condition for shinker count

2020-11-11 Thread Jaegeuk Kim
Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in wrong do_shinker work. Let's avoid to get stale data by using nat_tree_lock. Reported-by: Light Hsieh Signed-off-by: Jaegeuk Kim --- fs/f2fs/shrinker.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) d

Re: [f2fs-dev] [PATCH v3] f2fs: avoid race condition for shinker count

2020-11-11 Thread Jaegeuk Kim
Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in wrong do_shinker work. Let's avoid to get stale data by using nat_tree_lock. Reported-by: Light Hsieh Signed-off-by: Jaegeuk Kim --- v3: - fix to use NM_I(sbi) fs/f2fs/shrinker.c | 6 +- 1 file changed

Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-11 Thread Jaegeuk Kim
On 11/10, Chao Yu wrote: > On 2020/11/10 12:19, Jaegeuk Kim wrote: > > On 11/10, Chao Yu wrote: > > > On 2020/11/10 1:00, Jaegeuk Kim wrote: > > > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting > > > > in > > >

Re: [f2fs-dev] [PATCH] f2fs: compress: support chksum

2020-11-09 Thread Jaegeuk Kim
On 11/10, Chao Yu wrote: > On 2020/11/10 1:06, Jaegeuk Kim wrote: > > On 11/09, Chao Yu wrote: > > > On 2020/11/7 5:12, Jaegeuk Kim wrote: > > > > On 11/03, Chao Yu wrote: > > > > > On 2020/11/3 10:02, Chao Yu wrote: > > > > > > On 202

Re: [f2fs-dev] [PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Jaegeuk Kim
On 11/10, Chao Yu wrote: > On 2020/11/10 1:00, Jaegeuk Kim wrote: > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > > I didn't get the problem clearly, did you mean __count_nat_entries() will > give the wrong shrink count due to r

Re: [f2fs-dev] [PATCH] f2fs: compress: support chksum

2020-11-09 Thread Jaegeuk Kim
On 11/09, Chao Yu wrote: > On 2020/11/7 5:12, Jaegeuk Kim wrote: > > On 11/03, Chao Yu wrote: > > > On 2020/11/3 10:02, Chao Yu wrote: > > > > On 2020/11/3 0:31, Jaegeuk Kim wrote: > > > > > On 11/02, Chao Yu wrote: > > > > >

Re: [PATCH] f2fs: avoid unneeded data copy in f2fs_ioc_move_range()

2020-11-09 Thread Jaegeuk Kim
Sorry, please ignore this. On 11/09, Jaegeuk Kim wrote: > From: Chao Yu > > Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), > let's avoid copying this structure's data to userspace. > > Signed-off-by: Chao Yu > Signed-off-by: Jaegeuk Kim > -

[PATCH] f2fs: avoid race condition for shinker count

2020-11-09 Thread Jaegeuk Kim
t=1, dirty_nat_cnt=2 nat_cnt=1, dirty_nat_cnt=1 Reported-by: Light Hsieh Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 42394de6c7eb..e8ec65e40f06 100644 --- a/fs/f

[PATCH] f2fs: avoid unneeded data copy in f2fs_ioc_move_range()

2020-11-09 Thread Jaegeuk Kim
From: Chao Yu Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), let's avoid copying this structure's data to userspace. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs

[PATCH] f2fs: avoid unneeded data copy in f2fs_ioc_move_range()

2020-11-09 Thread Jaegeuk Kim
From: Chao Yu Fields in struct f2fs_move_range won't change in f2fs_ioc_move_range(), let's avoid copying this structure's data to userspace. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs

Re: [f2fs-dev] [PATCH v3 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE

2020-11-06 Thread Jaegeuk Kim
On 11/06, Chao Yu wrote: > On 2020/11/6 8:05, Eric Biggers wrote: > > This patch is marked 2/2, but it seems you sent it out on its own. Patch > > series > > are supposed to be resend in full; otherwise people can see just one patch > > and > > have no context. > > That's a historical problem,

Re: [f2fs-dev] [PATCH] f2fs: compress: support chksum

2020-11-06 Thread Jaegeuk Kim
On 11/03, Chao Yu wrote: > On 2020/11/3 10:02, Chao Yu wrote: > > On 2020/11/3 0:31, Jaegeuk Kim wrote: > > > On 11/02, Chao Yu wrote: > > > > This patch supports to store chksum value with compressed > > > > data, and verify the integrality of comp

Re: [f2fs-dev] [PATCH 1/1] f2fs-toos:fsck.f2fs Fix bad return value

2020-11-04 Thread Jaegeuk Kim
__, __LINE__);\ > > + printf("[ASSERT] (%s:%4d) %s\n",\ > > + __func__, __LINE__, #exp); \ > > exit(-1); \ > >

Re: [PATCH v2] f2fs: change write_hint for hot/warm nodes

2020-11-03 Thread Jaegeuk Kim
On 11/03, Daejun Park wrote: > In the fs-based mode of F2FS, the mapping of hot/warm node to > WRITE_LIFE_NOT_SET should be changed to WRITE_LIFE_SHORT. > > As a result of analyzing the write pattern of f2fs using real workload, > hot/warm nodes have high update ratio close to hot data.[*] >

Re: [f2fs-dev] [PATCH v3] f2fs: move ioctl interface definitions to separated file

2020-11-03 Thread Jaegeuk Kim
On 11/03, Chao Yu wrote: > On 2020/11/3 11:22, Eric Biggers wrote: > > On Mon, Nov 02, 2020 at 02:21:31PM +0800, Chao Yu wrote: > > > +#define F2FS_IOC_MOVE_RANGE _IOWR(F2FS_IOCTL_MAGIC, 9, > > > \ > > > + struct f2fs_move_range) > > [...]

Re: [f2fs-dev] [PATCH 1/1] f2fs-toos:fsck.f2fs Fix bad return value

2020-11-02 Thread Jaegeuk Kim
t;= 0); > ^~ Urg. Fixed by this. >From c986140e3c5abb9eb7a08928a88acb8273f1bd52 Mon Sep 17 00:00:00 2001 From: Robin Hsu Date: Mon, 26 Oct 2020 17:40:00 +0800 Subject: [PATCH] f2fs-toos: fsck.f2fs Fix bad return value 'ret' should not have been used here: otherwise, it would be

Re: linux-next: build failure after merge of the f2fs tree

2020-11-02 Thread Jaegeuk Kim
On 11/03, Stephen Rothwell wrote: > Hi all, > > After merging the f2fs tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > In file included from :32: > ./usr/include/linux/f2fs.h:92:2: error: unknown type name 'u8' >92 | u8 algorithm; > | ^~ >

Re: [PATCH] f2fs: compress: support chksum

2020-11-02 Thread Jaegeuk Kim
On 11/02, Chao Yu wrote: > This patch supports to store chksum value with compressed > data, and verify the integrality of compressed data while > reading the data. > > The feature can be enabled through specifying mount option > 'compress_chksum'. > > Signed-off-by: Chao Yu > --- >

Re: [f2fs-dev] [PATCH 1/1] f2fs-toos:fsck.f2fs Fix bad return value

2020-11-02 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2020/10/26 17:40, Robin Hsu via Linux-f2fs-devel wrote: > > 'ret' should not have been used here: otherwise, it would be wrongly used > > as the error code and then be returned from main(). > > > > Signed-off-by: Robin Hsu > > BTW, how about changing 'ret =

Re: [PATCH v2] f2fs: move ioctl interface definitions to separated file

2020-10-30 Thread Jaegeuk Kim
Hi Chao, Can we make a documentation for this in f2fs.rst? Thanks, On 10/30, Chao Yu wrote: > Like other filesystem does, we introduce a new file f2fs.h in path of > include/uapi/linux/, and move f2fs-specified ioctl interface definitions > to that file, after then, in order to use those

Re: [PATCH v4 1/5] scsi: ufs: atomic update for clkgating_enable

2020-10-28 Thread Jaegeuk Kim
On 10/27, Can Guo wrote: > On 2020-10-27 11:33, Jaegeuk Kim wrote: > > On 10/27, Can Guo wrote: > > > On 2020-10-27 03:51, Jaegeuk Kim wrote: > > > > From: Jaegeuk Kim > > > > > > > > When giving a stress test which enables/disables clkg

Re: [PATCH v4 1/5] scsi: ufs: atomic update for clkgating_enable

2020-10-26 Thread Jaegeuk Kim
On 10/27, Can Guo wrote: > On 2020-10-27 03:51, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > When giving a stress test which enables/disables clkgating, we hit > > device > > timeout sometimes. This patch avoids subtle racy condition to address > >

[PATCH v4 3/5] scsi: ufs: use WQ_HIGHPRI for gating work

2020-10-26 Thread Jaegeuk Kim
From: Jaegeuk Kim Must have WQ_MEM_RECLAIM ``WQ_MEM_RECLAIM`` All wq which might be used in the memory reclaim paths **MUST** have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Signed-off-by: Jaegeuk Kim Reviewed-by: Asutosh

[no subject]

2020-10-26 Thread Jaegeuk Kim
Change log from v3: - use __ufshcd_release with a fix in __ufshcd_release Change log from v2: - use active_req-- instead of __ufshcd_release to avoid UFS timeout Change log from v1: - remove clkgating_enable check in __ufshcd_release - use __uhfshcd_release instead of active_req.

[PATCH v4 1/5] scsi: ufs: atomic update for clkgating_enable

2020-10-26 Thread Jaegeuk Kim
From: Jaegeuk Kim When giving a stress test which enables/disables clkgating, we hit device timeout sometimes. This patch avoids subtle racy condition to address it. Note that, this requires a patch to address the device stuck by REQ_CLKS_OFF in __ufshcd_release(). The fix is "scsi: ufs:

[PATCH v4 2/5] scsi: ufs: clear UAC for FFU and RPMB LUNs

2020-10-26 Thread Jaegeuk Kim
From: Jaegeuk Kim In order to conduct FFU or RPMB operations, UFS needs to clear UAC. This patch clears it explicitly, so that we could get no failure given early execution. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 70 +++ drivers/scsi/ufs

[PATCH v4 4/5] scsi: add more contexts in the ufs tracepoints

2020-10-26 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Signed-off-by: Jaegeuk Kim Reviewed-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 6 -- include/trace/events/ufs.h | 21 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/scsi

[PATCH v4 5/5] scsi: ufs: fix clkgating on/off correctly

2020-10-26 Thread Jaegeuk Kim
by the check of ufshcd_any_tag_in_use() in gate_work. Fixes: 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Signed-off-by: Jaegeuk Kim Reviewed-by: Asutosh Das --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

Re: [PATCH v3 1/5] scsi: ufs: atomic update for clkgating_enable

2020-10-26 Thread Jaegeuk Kim
On 10/26, Can Guo wrote: > On 2020-10-26 14:13, Jaegeuk Kim wrote: > > On 10/26, Can Guo wrote: > > > On 2020-10-24 23:06, Jaegeuk Kim wrote: > > > > From: Jaegeuk Kim > > > > > > > > When giving a stress test which enables/disables clkg

Re: [PATCH v3 2/5] scsi: ufs: clear UAC for FFU and RPMB LUNs

2020-10-26 Thread Jaegeuk Kim
On 10/26, asuto...@codeaurora.org wrote: > On 2020-10-24 08:06, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > In order to conduct FFU or RPMB operations, UFS needs to clear UAC. This > > patch > > clears it explicitly, so that we could get no

[PATCH] f2fs: call f2fs_get_meta_page_retry for nat page

2020-10-26 Thread Jaegeuk Kim
When running fault injection test, if we don't stop checkpoint, some stale NAT entries were flushed which breaks consistency. Fixes: 86f33603f8c5 ("f2fs: handle errors of f2fs_get_meta_page_nofail") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH v2 5/5] scsi: ufs: fix clkgating on/off correctly

2020-10-26 Thread Jaegeuk Kim
On 10/26, Can Guo wrote: > On 2020-10-23 08:53, Jaegeuk Kim wrote: > > On 10/21, Can Guo wrote: > > > On 2020-10-21 12:52, jaeg...@kernel.org wrote: > > > > On 10/21, Can Guo wrote: > > > > > On 2020-10-21 03:52, Jaegeuk Kim wrote: > > > >

Re: [PATCH v3 1/5] scsi: ufs: atomic update for clkgating_enable

2020-10-26 Thread Jaegeuk Kim
On 10/26, Can Guo wrote: > On 2020-10-24 23:06, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > When giving a stress test which enables/disables clkgating, we hit > > device > > timeout sometimes. This patch avoids subtle racy condition to address > >

[PATCH v3 4/5] scsi: add more contexts in the ufs tracepoints

2020-10-24 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Reviewed-by: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 6 -- include/trace/events/ufs.h | 21 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/drivers/scsi

<    1   2   3   4   5   6   7   8   9   10   >