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

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

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

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

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

2020-12-08 Thread Jaegeuk Kim
r_out(prog); > + } > + qbuf_init(); > + } > #endif /* WITH_SLOAD */ > } > > @@ -812,6 +922,27 @@ static int do_resize(struct f2fs_sb_info *sbi) > #endif > > #ifdef WITH_SLOAD > +int init_compr(struct f2fs_sb_in

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: [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: [f2fs-dev] [PATCH v2] f2fs: fix to keep isolation of atomic write

2021-01-12 Thread Jaegeuk Kim
On 01/12, Chao Yu wrote: > On 2021/1/12 0:32, Jaegeuk Kim wrote: > > On 01/06, Jaegeuk Kim wrote: > > > On 01/06, Jaegeuk Kim wrote: > > > > Hi Chao, > > > > > > > > With a quick test, this patch causes down_write failure resulting in > &

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-12 Thread Jaegeuk Kim
On 01/12, Chao Yu wrote: > On 2021/1/12 10:04, Jaegeuk Kim wrote: > > On 01/12, Chao Yu wrote: > > > On 2021/1/11 19:45, Chao Yu wrote: > > > > On 2021/1/11 18:31, Chao Yu wrote: > > > > > On 2021/1/11 17:48, Jaegeuk Kim wrote: > > > >

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-13 Thread Jaegeuk Kim
On 01/13, Chao Yu wrote: > On 2021/1/13 6:36, Jaegeuk Kim wrote: > > On 01/12, Chao Yu wrote: > > > On 2021/1/12 10:04, Jaegeuk Kim wrote: > > > > On 01/12, Chao Yu wrote: > > > > > On 2021/1/11 19:45, Chao Yu wrote: > > > > > > On 2

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

2021-01-19 Thread Jaegeuk Kim
Is there v4 2/2? On 01/19, 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 requests as > much as possible to eliminate redundant checkpoint issues. Plus, we > can eliminate t

Re: [PATCH v2] f2fs: fix to keep isolation of atomic write

2021-01-19 Thread Jaegeuk Kim
On 01/15, Chao Yu wrote: > On 2021/1/15 5:53, Jaegeuk Kim wrote: > > On 12/30, Chao Yu wrote: > > > ThreadA ThreadB > > > - f2fs_ioc_start_atomic_write > > > - write > > > - f2fs_ioc_commit_a

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-19 Thread Jaegeuk Kim
On 01/16, Chao Yu wrote: > On 2021/1/15 22:59, Jaegeuk Kim wrote: > > On 01/15, Chao Yu wrote: > > > On 2021/1/14 12:06, Jaegeuk Kim wrote: > > > > On 01/14, Chao Yu wrote: > > > > > On 2021/1/13 23:41, Jaegeuk Kim wrote: > > > &

[PATCH v5 2/2] scsi: ufs: fix tm request correctly when non-fatal error happens

2021-01-07 Thread Jaegeuk Kim
From: Jaegeuk Kim When non-fatal error like line-reset happens, ufshcd_err_handler() starts to abort tasks by ufshcd_try_to_abort_task(). When it tries to issue tm request, we've hit two warnings. WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x68/0x70 WARNING: CPU: 4 PID

[PATCH v5 0/2] Two UFS fixes

2021-01-07 Thread Jaegeuk Kim
Change log from v4: - remove RESERVE tag for tm command - remove waiting IOs and let full reset handle it - avoid verbose error log which causes cpu lock up

[PATCH v5 1/2] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2021-01-07 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 Reviewed-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 19 --- 1 file changed, 12 insertions(+)

Re: [PATCH v4 2/2] scsi: ufs: handle LINERESET with correct tm_cmd

2021-01-07 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > On 2021-01-07 16:46, Jaegeuk Kim wrote: > > On 01/07, Can Guo wrote: > > > On 2021-01-07 16:07, Jaegeuk Kim wrote: > > > > On 01/07, Can Guo wrote: > > > > > On 2021-01-07 15:47, Jaegeuk Kim wrote: > > > > &g

Re: [f2fs-dev] [PATCH v3 1/5] f2fs: compress: add compress_inode to cache compressed blocks

2021-01-13 Thread Jaegeuk Kim
On 01/14, Chao Yu wrote: > On 2021/1/13 23:41, Jaegeuk Kim wrote: > > [58690.961685] F2FS-fs (vdb) : inject page get in f2fs_pagecache_get_page > > of f2fs_quota_write+0x150/0x1f0 [f2fs] > > [58691.071481] F2FS-fs (vdb): Inconsistent error blkaddr:31058, sit bitma

Re: [PATCH v2] f2fs: fix to keep isolation of atomic write

2021-01-14 Thread Jaegeuk Kim
On 12/30, Chao Yu wrote: > ThreadA ThreadB > - f2fs_ioc_start_atomic_write > - write > - f2fs_ioc_commit_atomic_write > - f2fs_commit_inmem_pages > - f2fs_drop_inmem_pages > - f2fs_drop_inmem_pages > - __revoke_inmem_pages >

[PATCH] f2fs: deprecate f2fs_trace_io

2021-01-14 Thread Jaegeuk Kim
This patch deprecates f2fs_trace_io, since f2fs uses page->private more broadly, resulting in more buggy cases. Signed-off-by: Jaegeuk Kim --- fs/f2fs/Kconfig | 10 --- fs/f2fs/Makefile | 1 - fs/f2fs/checkpoint.c | 3 - fs/f2fs/data.c | 4 -- fs/f2fs/file.c |

[PATCH] f2fs: handle unallocated section and zone on pinned/atgc

2020-12-23 Thread Jaegeuk Kim
If we have large section/zone, unallocated segment makes them corrupted. E.g., - Pinned file: -1 119304647 119304647 - ATGC data: -1 119304647 119304647 Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

Re: [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-24 Thread Jaegeuk Kim
On 03/24, Chao Yu wrote: > On 2021/3/24 12:22, Jaegeuk Kim wrote: > > On 03/24, Chao Yu wrote: > > > On 2021/3/24 2:39, Jaegeuk Kim wrote: > > > > On 03/23, Chao Yu wrote: > > > > > This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789. > >

Re: [PATCH v2] f2fs: fix to avoid touching checkpointed data in get_victim()

2021-03-24 Thread Jaegeuk Kim
On 03/24, Chao Yu wrote: > In CP disabling mode, there are two issues when using LFS or SSR | AT_SSR > mode to select victim: > > 1. LFS is set to find source section during GC, the victim should have > no checkpointed data, since after GC, section could not be set free for > reuse. > > Previousl

Re: [PATCH v2] f2fs: fix to avoid touching checkpointed data in get_victim()

2021-03-24 Thread Jaegeuk Kim
On 03/25, Chao Yu wrote: > On 2021/3/25 7:49, Jaegeuk Kim wrote: > > On 03/24, Chao Yu wrote: > > > In CP disabling mode, there are two issues when using LFS or SSR | AT_SSR > > > mode to select victim: > > > > > > 1. LFS is set to find source secti

Re: [PATCH RFC] f2fs: fix to avoid selecting full segment w/ {AT,}SSR allocator

2021-03-18 Thread Jaegeuk Kim
On 02/20, Chao Yu wrote: > In cp disabling mode, there could be a condition > - target segment has 128 ckpt valid blocks > - GC migrates 128 valid blocks to other segment (segment is still in > dirty list) > - GC migrates 384 blocks to target segment (segment has 128 cp_vblocks > and 384 vblocks) >

Re: [PATCH] f2fs: fix to align to section for fallocate() on pinned file

2021-03-23 Thread Jaegeuk Kim
On 03/23, Chao Yu wrote: > On 2021/3/5 17:56, Chao Yu wrote: > > Now, fallocate() on a pinned file only allocates blocks which aligns > > to segment rather than section, so GC may try to migrate pinned file's > > block, and after several times of failure, pinned file's block could > > be migrated t

Re: [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-23 Thread Jaegeuk Kim
On 03/23, Chao Yu wrote: > This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789. > > Because that commit fails generic/050 testcase which expect failure > during mount a recoverable readonly partition. I think we need to change generic/050, since f2fs can recover this partition, even thou

Re: [PATCH RFC] f2fs: fix to avoid selecting full segment w/ {AT,}SSR allocator

2021-03-23 Thread Jaegeuk Kim
On 03/19, Chao Yu wrote: > On 2021/3/19 1:17, Jaegeuk Kim wrote: > > On 02/20, Chao Yu wrote: > > > In cp disabling mode, there could be a condition > > > - target segment has 128 ckpt valid blocks > > > - GC migrates 128 valid blocks to other segment (

Re: [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-23 Thread Jaegeuk Kim
On 03/24, Chao Yu wrote: > On 2021/3/24 2:39, Jaegeuk Kim wrote: > > On 03/23, Chao Yu wrote: > > > This reverts commit 938a184265d75ea474f1c6fe1da96a5196163789. > > > > > > Because that commit fails generic/050 testcase which expect failure > > >

Re: [f2fs-dev] [PATCH] f2fs: expose # of overprivision segments

2021-03-04 Thread Jaegeuk Kim
On 03/04, Chao Yu wrote: > On 2021/3/3 2:44, Jaegeuk Kim wrote: > > On 03/02, Jaegeuk Kim wrote: > > > On 03/02, Chao Yu wrote: > > > > On 2021/3/2 13:42, Jaegeuk Kim wrote: > > > > > This is useful when checking conditions during checkpoint=disable

Re: [f2fs-dev] [PATCH v4] f2fs: compress: add compress_inode to cache compressed blockst

2021-03-04 Thread Jaegeuk Kim
On 02/27, Jaegeuk Kim wrote: > On 02/04, Chao Yu wrote: > > Jaegeuk, > > > > On 2021/2/2 16:00, Chao Yu wrote: > > > - for (i = 0; i < dic->nr_cpages; i++) { > > > + for (i = 0; i < cc->nr_cpages; i++) { > > > struct p

Re: [f2fs-dev] [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-30 Thread Jaegeuk Kim
On 03/27, Chao Yu wrote: > On 2021/3/27 9:52, Chao Yu wrote: > > On 2021/3/27 1:30, Jaegeuk Kim wrote: > > > On 03/26, Chao Yu wrote: > > > > On 2021/3/26 9:19, Jaegeuk Kim wrote: > > > > > On 03/26, Chao Yu wrote: > > > > > > On

Re: f2fs_convert_inline_inode causing rebalance based on random uninitialized value in dn.node_changed

2021-03-03 Thread Jaegeuk Kim
may or not may not balances dirty node > and dentry pages depending on the uninitialized state of the variable. > > I believe the issue was introduced by commit: > > commit 2a3407607028f7c780f1c20faa4e922bf631d340 > Author: Jaegeuk Kim > Date: Tue Dec 22 13:23:35 2015 -0800 &

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

2021-03-03 Thread Jaegeuk Kim
On 03/03, Stephen Rothwell wrote: > Hi all, > > After merging the f2fs tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > fs/f2fs/sysfs.c:576:25: warning: 'f2fs_attr_ovp_segments' defined but not > used [-Wunused-variable] > 576 | static struct f2fs_attr f2fs_att

Re: [PATCH v2] f2fs: expose # of overprivision segments

2021-03-03 Thread Jaegeuk Kim
This is useful when checking conditions during checkpoint=disable in Android. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 5 + fs/f2fs/sysfs.c | 9 + 2 files changed, 14 insertions(+) diff --git a/Documentation/ABI/testing/sysfs

Re: f2fs_convert_inline_inode causing rebalance based on random uninitialized value in dn.node_changed

2021-03-03 Thread Jaegeuk Kim
On 03/03, Colin Ian King wrote: > On 03/03/2021 19:44, Jaegeuk Kim wrote: > > On 03/02, Colin Ian King wrote: > >> Hi, > >> > >> Static analysis on linux-next detected a potential uninitialized > >> variable dn.node_changed that does not get set w

Re: [f2fs-dev] [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-25 Thread Jaegeuk Kim
On 03/26, Chao Yu wrote: > On 2021/3/25 9:59, Chao Yu wrote: > > On 2021/3/25 6:44, Jaegeuk Kim wrote: > > > On 03/24, Chao Yu wrote: > > > > On 2021/3/24 12:22, Jaegeuk Kim wrote: > > > > > On 03/24, Chao Yu wrote: > > > > > > On 202

Re: [PATCH v3] f2fs: allow to change discard policy based on cached discard cmds

2021-03-25 Thread Jaegeuk Kim
On 03/26, Sahitya Tummala wrote: > Hi Jaegeuk, > > This latest v3 patch needs to be updated in f2fs tree. > The f2fs tree currently points to older version of patch. > > Please make a note of it. Ha, need more coffee. Thanks for pointing it out. :) > > Thanks, > Sahitya. > > On Tue, Mar 16, 2

Re: [f2fs-dev] [PATCH] Revert "f2fs: give a warning only for readonly partition"

2021-03-26 Thread Jaegeuk Kim
On 03/26, Chao Yu wrote: > On 2021/3/26 9:19, Jaegeuk Kim wrote: > > On 03/26, Chao Yu wrote: > > > On 2021/3/25 9:59, Chao Yu wrote: > > > > On 2021/3/25 6:44, Jaegeuk Kim wrote: > > > > > On 03/24, Chao Yu wrote: > > > > > > On 2021

[PATCH] dm verity: fix not aligned logical block size of RS roots IO

2021-04-12 Thread Jaegeuk Kim
From: Jaegeuk Kim commit df7b59ba9245 ("dm verity: fix FEC for RS roots unaligned to block size") made dm_bufio->block_size 1024, if f->roots is 2. But, that gives the below EIO if the logical block size of the device is 4096, given v->data_dev_block_bits=12. E sd 0:

Re: [PATCH v2] f2fs: fix to avoid touching checkpointed data in get_victim()

2021-04-12 Thread Jaegeuk Kim
On 04/11, Chao Yu wrote: > Hi Jaegeuk, > > Could you please help to merge below cleanup diff into original patch? > or merge this separately if it is too late since it is near rc7. I didn't review this tho, this gives an error in xfstests/083. > > From 5a342a8f332a1b3281ec0e2b4d41b5287689c8ed M

Re: [PATCH v3] f2fs: fix to keep isolation of atomic write

2021-04-12 Thread Jaegeuk Kim
On 04/12, Chao Yu wrote: > As Yi Chen reported, there is a potential race case described as below: > > Thread A Thread B > - f2fs_ioc_start_atomic_write > - mkwrite >- set_page_dirty >

Re: [PATCH v3] f2fs: fix to keep isolation of atomic write

2021-04-13 Thread Jaegeuk Kim
On 04/13, Chao Yu wrote: > On 2021/4/13 11:27, Jaegeuk Kim wrote: > > On 04/12, Chao Yu wrote: > > > As Yi Chen reported, there is a potential race case described as below: > > > > > > Thread A Thread B > > > - f2fs_ioc_start_atomic_wr

Re: [PATCH] dm verity: fix not aligned logical block size of RS roots IO

2021-04-13 Thread Jaegeuk Kim
On 04/12, Jaegeuk Kim wrote: > From: Jaegeuk Kim > > commit df7b59ba9245 ("dm verity: fix FEC for RS roots unaligned to block > size") > made dm_bufio->block_size 1024, if f->roots is 2. But, that gives the below > EIO > if the logical block s

[PATCH RESEND] dm verity: fix not aligned logical block size of RS roots IO

2021-04-14 Thread Jaegeuk Kim
From: Jaegeuk Kim commit df7b59ba9245 ("dm verity: fix FEC for RS roots unaligned to block size") made dm_bufio->block_size 1024, if f->roots is 2. But, that gives the below EIO if the logical block size of the device is 4096, given v->data_dev_block_bits=12. E sd 0:

[PATCH] f2fs: set checkpoint_merge by default

2021-04-01 Thread Jaegeuk Kim
Once we introduced checkpoint_merge, we've seen some contention w/o the option. In order to avoid it, let's set it by default. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 14239e2b7ae7..c1

Re: [PATCH] f2fs: fix to cover allocate_segment() with lock

2021-04-19 Thread Jaegeuk Kim
On 04/14, Chao Yu wrote: > As we did for other cases, in fix_curseg_write_pointer(), let's > change as below: > - use callback function s_ops->allocate_segment() instead of > raw function allocate_segment_by_default(); > - cover allocate_segment() with curseg_lock and sentry_lock. > > Signed-off-b

[PATCH] dm verity: fix unaligned block size

2021-04-10 Thread Jaegeuk Kim
From: Jaegeuk Kim When f->roots is 2 and block size is 4096, it will gives unaligned block size length in the scsi command like below. Let's allocate dm_bufio to set the block size length to match IO chunk size. E sd 0: 0:0:0: [sda] tag#30 request not aligned to the logical bloc

Re: [PATCH] dm verity: fix unaligned block size

2021-04-10 Thread Jaegeuk Kim
Sorry, this patch is totally wrong. Let me dig out more. On 04/10, Jaegeuk Kim wrote: > From: Jaegeuk Kim > > When f->roots is 2 and block size is 4096, it will gives unaligned block size > length in the scsi command like below. Let's allocate dm_bufio to set the > block

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 Hs

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

2020-11-17 Thread Jaegeuk Kim
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

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

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

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 d_rev

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 ser

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 g

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 conflict

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: [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: [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? Let

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

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

[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: [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" mo

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

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 le

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 b/fs/

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 compre

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

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

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

2020-12-17 Thread Jaegeuk Kim
e compressed files. > +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

[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: [f2fs-dev] [PATCH v3 2/3] f2fs-tools:sload.f2fs compression support

2020-12-18 Thread Jaegeuk Kim
; > + MSG(0, "\tError: compression sub-options are used" > > + " without the compression enable (-c) option\n" > > + ); > > + error_out(prog); > > + } > > +

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

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

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

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

[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

[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

Re: [f2fs-dev] [PATCH][next] f2fs: Replace one-element array with flexible-array member

2021-02-27 Thread Jaegeuk Kim
On 02/25, Chao Yu wrote: > Hello, Gustavo, > > On 2021/2/25 3:03, Gustavo A. R. Silva wrote: > > There is a regular need in the kernel to provide a way to declare having > > a dynamically sized set of trailing elements in a structure. Kernel code > > should always use “flexible array members”[1] f

Re: [PATCH v4] f2fs: compress: add compress_inode to cache compressed blockst

2021-02-27 Thread Jaegeuk Kim
On 02/04, Chao Yu wrote: > Jaegeuk, > > On 2021/2/2 16:00, Chao Yu wrote: > > - for (i = 0; i < dic->nr_cpages; i++) { > > + for (i = 0; i < cc->nr_cpages; i++) { > > struct page *page = dic->cpages[i]; > > por_fsstress still hang in this line? I'm stuck on testing the patches, s

Re: [PATCH RFC] f2fs: fix to avoid selecting full segment w/ {AT,}SSR allocator

2021-02-27 Thread Jaegeuk Kim
On 02/23, Chao Yu wrote: > Jaegeuk, > > Could you please help to review this patch? since I doubt that this > issue can happen in real world... :( Let me take a look as soon as I have some time. Sorry for the delay. > > Thanks, > > On 2021/2/22 21:43, Chao Yu wrote: > > Ping, > > > > On 2021/

<    3   4   5   6   7   8   9   10   11   12   >