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

2020-10-24 Thread Jaegeuk Kim
) if (ufshcd_any_tag_in_use() == 1) return; ufshcd_tmc_handler(hba); blk_mq_tagset_busy_iter(); Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs

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

2020-10-24 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

[UFS v3] UFS fixes

2020-10-24 Thread Jaegeuk Kim
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 v3 3/5] scsi: ufs: use WQ_HIGHPRI for gating work

2020-10-24 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 --- drivers/scsi/ufs

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

2020-10-24 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. If we use __ufshcd_release(), I've seen that gate_work can be called in parallel with ungate_work, which results in UFS timeout

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

2020-10-22 Thread Jaegeuk Kim
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: > > > > The below call stack prevents clk_gating at every IO completion. > > > > We can remove the

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

2020-10-20 Thread Jaegeuk Kim
) if (ufshcd_any_tag_in_use() == 1) return; ufshcd_tmc_handler(hba); blk_mq_tagset_busy_iter(); Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2020-10-20 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 12 ++-- 1

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

2020-10-20 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 70

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

2020-10-20 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo

propose some UFS fixes

2020-10-20 Thread Jaegeuk Kim
Change log from v1: - remove clkgating_enable check in __ufshcd_release - use __uhfshcd_release instead of active_req.

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

2020-10-20 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Cc: Alim Akhtar Cc: Avri Altman 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

[PATCH] scsi: ufs: fix no clkgating due to tag being alive

2020-10-16 Thread Jaegeuk Kim
) if (ufshcd_any_tag_in_use() == 1) return; ufshcd_tmc_handler(hba); blk_mq_tagset_busy_iter(); Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] f2fs: fix memory alignment to support 32bit

2020-10-08 Thread Jaegeuk Kim
In 32bit system, 64-bits key breaks memory alignment. This fixes the commit "f2fs: support 64-bits key in f2fs rb-tree node entry". Reported-by: Nicolas Chauvet Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletio

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

2020-10-05 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 70

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

2020-10-05 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Cc: Alim Akhtar Cc: Avri Altman Cc: 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

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

2020-10-05 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo

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

2020-10-05 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. Cc: Alim Akhtar Cc: Avri Altman Cc: Can Guo Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 12 ++-- 1

[PATCH] f2fs: f2fs_get_meta_page_nofail should not be failed

2020-10-02 Thread Jaegeuk Kim
Otherwise, f2fs can break the the consistency. (e.g., BUG_ON in f2fs_get_sum_page) Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 9 +++-- fs/f2fs/f2fs.h | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: compress: introduce page array slab cache

2020-09-29 Thread Jaegeuk Kim
On 09/29, Chao Yu wrote: > On 2020/9/29 17:15, Chao Yu wrote: > > On 2020/9/29 16:47, Jaegeuk Kim wrote: > > > On 09/29, Chao Yu wrote: > > > > On 2020/9/29 16:23, Jaegeuk Kim wrote: > > > > > I found a bug related to the number of page pointer allocat

Re: [f2fs-dev] [PATCH v2 1/2] f2fs: compress: introduce page array slab cache

2020-09-29 Thread Jaegeuk Kim
On 09/29, Jaegeuk Kim wrote: > On 09/29, Chao Yu wrote: > > On 2020/9/29 16:23, Jaegeuk Kim wrote: > > > I found a bug related to the number of page pointer allocation related to > > > nr_cpages. > > > > Jaegeuk, > > > > If I didn't miss anythin

Re: [PATCH v2 1/2] f2fs: compress: introduce page array slab cache

2020-09-29 Thread Jaegeuk Kim
On 09/29, Chao Yu wrote: > On 2020/9/29 16:23, Jaegeuk Kim wrote: > > I found a bug related to the number of page pointer allocation related to > > nr_cpages. > > Jaegeuk, > > If I didn't miss anything, you mean that nr_cpages could be larger > than nr_rpages, ri

Re: [PATCH v2 1/2] f2fs: compress: introduce page array slab cache

2020-09-29 Thread Jaegeuk Kim
I found a bug related to the number of page pointer allocation related to nr_cpages. diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index f086ac43ca825..3a18666725fef 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -20,22 +20,20 @@ static struct kmem_cache *cic_entry_slab;

Re: [f2fs-dev] [PATCH] f2fs: point man pages for some f2fs utils

2020-09-25 Thread Jaegeuk Kim
On 09/26, Chao Yu wrote: > On 2020-9-26 7:26, Jaegeuk Kim wrote: > > On 09/25, Jaegeuk Kim wrote: > > > This patch adds some missing contexts related to f2fs-tools in f2fs > > > documentation. > > > > > > Signed-off-by: Jaegeuk Kim > > &

Re: [PATCH] f2fs: fix slab leak of rpages pointer

2020-09-25 Thread Jaegeuk Kim
I missed the f2fs mailing list by gitconfig. :) On 09/23, Jaegeuk Kim wrote: > This fixes the below mem leak. > > [ 130.157600] > = > [ 130.159662] BUG f2fs_page_array_entry-252:16 (Tainted

Re: [PATCH] f2fs: point man pages for some f2fs utils

2020-09-25 Thread Jaegeuk Kim
On 09/25, Jaegeuk Kim wrote: > This patch adds some missing contexts related to f2fs-tools in f2fs > documentation. > > Signed-off-by: Jaegeuk Kim > --- > Documentation/filesystems/f2fs.rst | 46 -- > 1 file changed, 44 insertions(+), 2 deletio

[PATCH] f2fs: point man pages for some f2fs utils

2020-09-25 Thread Jaegeuk Kim
This patch adds some missing contexts related to f2fs-tools in f2fs documentation. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.rst | 46 -- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/f2fs.rst b

Re: [PATCH] f2fs: compress: fix to disallow enabling compress on non-empty file

2020-09-24 Thread Jaegeuk Kim
On 09/18, Chao Yu wrote: > Compressed inode and normal inode has different layout, so we should > disallow enabling compress on non-empty file to avoid race condition > during inode .i_addr array parsing and updating. > > Signed-off-by: Chao Yu > --- > fs/f2fs/file.c | 2 ++ > 1 file changed, 2

[PATCH] f2fs: fix slab leak of rpages pointer

2020-09-23 Thread Jaegeuk Kim
7/0xe0 [ 130.237898] __x64_sys_write+0x1a/0x20 [ 130.239309] do_syscall_64+0x38/0x90 Signed-off-by: Jaegeuk Kim --- fs/f2fs/compress.c | 2 +- fs/f2fs/data.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 10a9f39

Re: [PATCH 0/5] Add support for Encryption and Casefolding in F2FS

2020-09-22 Thread Jaegeuk Kim
On 09/22, Eric Biggers wrote: > On Tue, Sep 22, 2020 at 03:48:02AM -0700, Daniel Rosenberg wrote: > > These patches are on top of the f2fs dev branch > > > > F2FS currently supports casefolding and encryption, but not at > > the same time. These patches aim to rectify that. In a later follow up,

Re: [PATCH 5/6] scsi: ufs: show ufs part info in error case

2020-09-17 Thread Jaegeuk Kim
On 09/17, Can Guo wrote: > On 2020-09-17 00:05, Jaegeuk Kim wrote: > > On 09/16, Bean Huo wrote: > > > On Tue, 2020-09-15 at 13:45 -0700, Jaegeuk Kim wrote: > > > > Cc: Avri Altman > > > > Signed-off-by: Jaegeuk Kim > > > > --- > >

Re: [PATCH 4/6] scsi: ufs: fix LINERESET on hibern8

2020-09-17 Thread Jaegeuk Kim
Please ignore this patch. Thanks. On 09/15, Jaegeuk Kim wrote: > From: Jaegeuk Kim > > When testing infinite test to read sysfs entries of UFS, I got a UFS timeout > with the following kernel message. > > query: dev_cmd_send: seq_no=78082 tag=31, idn=2 > query: ufshcd_wait

Re: [PATCH 5/6] scsi: ufs: show ufs part info in error case

2020-09-16 Thread Jaegeuk Kim
On 09/16, Bean Huo wrote: > On Tue, 2020-09-15 at 13:45 -0700, Jaegeuk Kim wrote: > > Cc: Avri Altman > > Signed-off-by: Jaegeuk Kim > > --- > > drivers/scsi/ufs/ufshcd.c | 8 > > 1 file changed, 8 insertions(+) > > > > diff --git a

[PATCH 2/6] scsi: ufs: clear UAC for FFU

2020-09-15 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. Cc: Alim Akhtar Cc: Avri Altman Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 41

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

2020-09-15 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. Cc: Alim Akhtar Cc: Avri Altman Signed-off

[PATCH 4/6] scsi: ufs: fix LINERESET on hibern8

2020-09-15 Thread Jaegeuk Kim
From: Jaegeuk Kim When testing infinite test to read sysfs entries of UFS, I got a UFS timeout with the following kernel message. query: dev_cmd_send: seq_no=78082 tag=31, idn=2 query: ufshcd_wait_for_dev_cmd: dev_cmd request timedout, tag 31 query: __ufshcd_query_descriptor: opcode 0x01

[PATCH 5/6] scsi: ufs: show ufs part info in error case

2020-09-15 Thread Jaegeuk Kim
From: Jaegeuk Kim This patch shows ufs part info in kernel messages for debugging purpose. It's useful when we only have the last kernel message. Cc: Alim Akhtar Cc: Avri Altman Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 8 1 file changed, 8 insertions(+) diff

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

2020-09-15 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. Cc: Alim Akhtar Cc: Avri Altman Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 12 ++-- 1 file changed, 6

[PATCH 6/6] scsi: add more contexts in the ufs tracepoints

2020-09-15 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Cc: Alim Akhtar Cc: Avri Altman 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

[GIT PULL] small bug fixes for 5.9

2020-09-10 Thread Jaegeuk Kim
Hi Linus, Could you please consider this pull reqeuest having some critical bug fixes? Thanks, The following changes since commit 34d4ddd359dbcdf6c5fb3f85a179243d7a1cb7f8: Merge tag 'linux-kselftest-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest (2020-09-08

Re: [f2fs-dev] [PATCH] f2fs: clean up vm_map_ram() call

2020-09-08 Thread Jaegeuk Kim
On 09/09, Chao Yu wrote: > On 2020/9/9 10:36, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Made f2fs_vmap() wrapper to handle vm_map_ram() stuff. > > > > Signed-off-by: Daeho Jeong > > LGTM, > > I think it should be merged into original patch. :) > > Maybe Jaeguek could help to do that.

Re: [f2fs-dev] [PATCH v2] f2fs: change i_compr_blocks of inode to atomic value

2020-09-03 Thread Jaegeuk Kim
On 09/03, Daeho Jeong wrote: > From: Daeho Jeong > > writepages() can be concurrently invoked for the same file by different > threads such as a thread fsyncing the file and a kworker kernel thread. > So, changing i_compr_blocks without protection is racy and we need to > protect it by changing

Re: [PATCH] f2fs: Documentation edits/fixes

2020-09-03 Thread Jaegeuk Kim
f F2fs to F2FS for consistency. > > > > Signed-off-by: Randy Dunlap > > Cc: Jaegeuk Kim > > Cc: Chao Yu > > Cc: linux-f2fs-de...@lists.sourceforge.net > > --- > > Documentation/filesystems/f2fs.rst | 53 +++ > > 1 file change

Re: [PATCH v2 5/5] f2fs: support age threshold based garbage collection

2020-08-31 Thread Jaegeuk Kim
Hi Chao, Applied. Thanks. On 08/31, Chao Yu wrote: > Hi Jaegeuk, > > I've changed code a bit to fix some bugs, including: > - gc_idle = 3 (GC_IDLE_AT) description > - disallow set gc_idle to 3 if atgc is off > - keep compatibility with checkpoint disabling > > Could you please check and merge

Re: [PATCH v2 5/5] f2fs: support age threshold based garbage collection

2020-08-25 Thread Jaegeuk Kim
Hi Chao, I modified directly like below which makes fsck complain wrong free segment number. diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 60d6b0795231a..a0d7a7e04bc70 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2728,9 +2728,6 @@ static void

Re: [PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches

2020-08-24 Thread Jaegeuk Kim
On 08/24, Eric Biggers wrote: > On Mon, Jul 27, 2020 at 09:45:08AM -0700, Eric Biggers wrote: > > On Mon, Jul 20, 2020 at 10:09:51AM -0700, Eric Biggers wrote: > > > On Wed, Jul 08, 2020 at 02:12:33AM -0700, Daniel Rosenberg wrote: > > > > This lays the ground work for enabling casefolding and

[GIT PULL] f2fs update for 5.9-rc1

2020-08-10 Thread Jaegeuk Kim
ack Qiu (4): f2fs: get the right gc victim section when section has several segments f2fs: space related cleanup f2fs: correct comment of f2fs_exist_written_data f2fs: use macro instead of f2fs verity version Jaegeuk Kim (5): f2fs: avoid checkpatch error f2fs: av

Re: [f2fs-dev] [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-08-03 Thread Jaegeuk Kim
On 08/04, Chao Yu wrote: > On 2020/8/4 10:44, Jaegeuk Kim wrote: > > On 08/04, Chao Yu wrote: > > > On 2020/7/25 16:42, Chao Yu wrote: > > > > On 2020/7/16 9:24, Chao Yu wrote: > > > > > On 2020/7/16 3:07, Jaegeuk Kim wrote: > > > > >

Re: [f2fs-dev] [PATCH] f2fs: fix deadlock between quota writes and checkpoint

2020-08-03 Thread Jaegeuk Kim
On 08/04, Chao Yu wrote: > On 2020/7/29 15:02, Jaegeuk Kim wrote: > > f2fs_write_data_pages(quota_mapping) > > __f2fs_write_data_pages f2fs_write_checkpoint > >* blk_start_plug(); > >* add bio in write_io[DATA] > >

Re: [f2fs-dev] [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-08-03 Thread Jaegeuk Kim
On 08/04, Chao Yu wrote: > On 2020/7/25 16:42, Chao Yu wrote: > > On 2020/7/16 9:24, Chao Yu wrote: > > > On 2020/7/16 3:07, Jaegeuk Kim wrote: > > > > On 07/15, Chao Yu wrote: > > > > > On 2020/7/7 11:51, Jaegeuk Kim wrote: > > > > >

Re: [f2fs-dev] [PATCH] f2fs: remove a waiter for checkpoint completion

2020-08-03 Thread Jaegeuk Kim
On 08/04, Chao Yu wrote: > On 2020/8/4 9:04, Jaegeuk Kim wrote: > > On 08/04, Chao Yu wrote: > > > On 2020/8/4 1:28, Jaegeuk Kim wrote: > > > > It doesn't need to wait for checkpoint being completed triggered by > > > > end_io. > > &g

Re: [f2fs-dev] [PATCH] f2fs: remove a waiter for checkpoint completion

2020-08-03 Thread Jaegeuk Kim
On 08/04, Chao Yu wrote: > On 2020/8/4 1:28, Jaegeuk Kim wrote: > > It doesn't need to wait for checkpoint being completed triggered by end_io. > > > > [ 20.157753] [ cut here ] > > [ 20.158393] do not call blocking ops when

[PATCH] f2fs: remove a waiter for checkpoint completion

2020-08-03 Thread Jaegeuk Kim
d+0x11/0x20 [ 20.178975] ? finish_wait+0x260/0x260 [ 20.179488] ? percpu_counter_set+0x147/0x230 [ 20.180049] do_checkpoint+0x1757/0x2a50 [ 20.180558] f2fs_write_checkpoint+0x840/0xaf0 [ 20.181126] f2fs_sync_fs+0x287/0x4a0 Reported-by: Eric Biggers Signed-off-by: Jaegeuk Kim --- f

Re: [f2fs-dev] [PATCH] f2fs: fix deadlock between quota writes and checkpoint

2020-07-29 Thread Jaegeuk Kim
On 07/29, Chao Yu wrote: > On 2020-7-29 15:02, Jaegeuk Kim wrote: > > f2fs_write_data_pages(quota_mapping) > > __f2fs_write_data_pages f2fs_write_checkpoint > > * blk_start_plug(); > > * add bio in write_io[DATA] > >

[PATCH] f2fs: fix deadlock between quota writes and checkpoint

2020-07-29 Thread Jaegeuk Kim
_write(node_write) - f2fs_wait_on_all_pages(F2FS_WB_CP_DATA); Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 8c782d3

Re: [PATCH 3/5] f2fs: inherit mtime of original block during GC

2020-07-26 Thread Jaegeuk Kim
On 07/07, Chao Yu wrote: > Don't let f2fs inner GC ruins original aging degree of segment. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c| 2 +- > fs/f2fs/f2fs.h| 5 +++-- > fs/f2fs/gc.c | 4 ++-- > fs/f2fs/segment.c | 55 --- > 4

Re: [PATCH 1/5] f2fs: introduce inmem curseg

2020-07-26 Thread Jaegeuk Kim
On 07/07, Chao Yu wrote: > Previous implementation of aligned pinfile allocation will: > - allocate new segment on cold data log no matter whether last used > segment is partially used or not, it makes IOs more random; > - force concurrent cold data/GCed IO going into warm data area, it > can make

Re: [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Jaegeuk Kim
On 07/22, Greg KH wrote: > On Wed, Jul 22, 2020 at 09:43:56AM -0700, Jaegeuk Kim wrote: > > On 07/19, Greg KH wrote: > > > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > > > From: Daeho Jeong > > > > > > > > Added

Re: [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Jaegeuk Kim
On 07/19, Greg KH wrote: > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added a symbolic link directory pointing to its device name > > directory using the volume name of the partition in sysfs. > > (i.e., /sys/fs/f2fs/vol_#x -> /sys/fs/f2fs/sda1) >

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-15 Thread Jaegeuk Kim
On 07/16, Chao Yu wrote: > On 2020/7/16 3:10, Jaegeuk Kim wrote: > > On 07/14, Chao Yu wrote: > >> On 2020/7/14 1:59, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > >>>> On 2020/7/10 11:50, Jaegeuk Kim wrote: > >>>>> On 07/10

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-15 Thread Jaegeuk Kim
On 07/14, Chao Yu wrote: > On 2020/7/14 1:59, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:50, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > >>>> On 2020/7/10 11:26, Jaegeuk Kim wrote: > >>>>> On 07/1

Re: [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-07-15 Thread Jaegeuk Kim
On 07/15, Chao Yu wrote: > On 2020/7/7 11:51, Jaegeuk Kim wrote: > > On 07/07, Chao Yu wrote: > >> On 2020/7/7 11:21, Jaegeuk Kim wrote: > >>> Hi Chao, > >>> > >>> Do you have any brief design doc to present the idea? > >> > >>

Re: F2FS Segmentation Fault

2020-07-13 Thread Jaegeuk Kim
On 07/13, Nathan Royce wrote: > On Mon, Jul 13, 2020 at 7:03 PM Jaegeuk Kim wrote: > > > > Hi Nathan, > > > > Could you try to say "N" here to move forward to fix the corrupted metadata? > > > > Thanks, > * > Do you want to restore los

Re: F2FS Segmentation Fault

2020-07-13 Thread Jaegeuk Kim
Hi Nathan, On 07/13, Nathan Royce wrote: > I won't re-format unless I hear something within a few days in case > you want me to try something. > > Preface: There was a notable power outage a couple of nights ago. > When the power returned, everything seemed fine. No issues during > bootup or

Re: [PATCH v2] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-13 Thread Jaegeuk Kim
Hi Daeho, Please take a look at this. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=35245180459aebf6d70fde88a538f0400a794aa6 Thanks, On 07/13, Daeho Jeong wrote: > From: Daeho Jeong > > Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > 1.

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-13 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:50, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:26, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > >>>> On 2020/7/10 3:05, Jaegeuk Kim wrote: > >>>>> On 07/0

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-10 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:50, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:26, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > >>>> On 2020/7/10 3:05, Jaegeuk Kim wrote: > >>>>> On 07/0

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-10 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:52, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:31, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > >>>> On 2020/7/10 11:02, Jaegeuk Kim wrote: > >>>&

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:31, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:02, Jaegeuk Kim wrote: > >>> On 07/10, Daeho Jeong wrote: > >>>> From: Daeho Jeong > >>>> > >>>> Changed t

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:26, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 3:05, Jaegeuk Kim wrote: > >>> On 07/09, Chao Yu wrote: > >>>> On 2020/7/9 13:30, Jaegeuk Kim wrote: > >>>>&

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:02, Jaegeuk Kim wrote: > > On 07/10, Daeho Jeong wrote: > >> From: Daeho Jeong > >> > >> Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > >> 1. Added -1 value support for range.len to

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/09, Eric Biggers wrote: > On Thu, Jul 09, 2020 at 08:20:35PM -0700, Jaegeuk Kim wrote: > > On 07/10, Daeho Jeong wrote: > > > 1. The valid data will be within i_size. > > > 2. All the trim operations will be done in a unit of block, even if > > > i_s

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 3:05, Jaegeuk Kim wrote: > > On 07/09, Chao Yu wrote: > >> On 2020/7/9 13:30, Jaegeuk Kim wrote: > >>> It doesn't need to bypass flushing quota data in background. > >> > >> The condition is used to flush quot

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
Yes. Basically, I believe we can have some data beyond i_size like fsverity. > > 2020년 7월 10일 (금) 오후 12:02, Jaegeuk Kim 님이 작성: > > > > On 07/10, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > Changed the way of handling range.len of F2FS_IOC_S

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Daeho Jeong wrote: > From: Daeho Jeong > > Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > 1. Added -1 value support for range.len to signify the end of file. > 2. If the end of the range passes over the end of file, it means until > the end of file. > 3.

Re: [f2fs-dev] [PATCH] f2fs: don't skip writeback of quota data

2020-07-09 Thread Jaegeuk Kim
On 07/09, Chao Yu wrote: > On 2020/7/9 13:30, Jaegeuk Kim wrote: > > It doesn't need to bypass flushing quota data in background. > > The condition is used to flush quota data in batch to avoid random > small-sized udpate, did you hit any problem here? I suspect this causes fa

Re: [f2fs-dev] [PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Jaegeuk Kim
On 07/09, Chao Yu wrote: > On 2020/7/9 9:57, Daeho Jeong wrote: > > From: Daeho Jeong > > > > When end_addr comes to zero, it'll trigger different behaviour. > > To prevent this, we need to ignore the case of that range.len is > > zero in the function. > > > > Signed-off-by: Daeho Jeong > >

[PATCH] f2fs: don't skip writeback of quota data

2020-07-08 Thread Jaegeuk Kim
It doesn't need to bypass flushing quota data in background. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 44645f4f914b6..72e8b50e588c1 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c

Re: [PATCH v12 3/4] f2fs: Use generic casefolding support

2020-07-08 Thread Jaegeuk Kim
tely apply to both. > > Signed-off-by: Daniel Rosenberg > Reviewed-by: Eric Biggers Acked-by: Jaegeuk Kim > --- > fs/f2fs/dir.c | 84 + > fs/f2fs/f2fs.h | 4 -- > fs/f2fs/super.c | 10 ++--- > fs/f2fs/s

Re: [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-07-06 Thread Jaegeuk Kim
On 07/07, Chao Yu wrote: > On 2020/7/7 11:21, Jaegeuk Kim wrote: > > Hi Chao, > > > > Do you have any brief design doc to present the idea? > > Hi Jaegeuk, > > You mean this whole patchset, right? > > I can add a brief design description in patch 0/

Re: [PATCH RFC 1/5] f2fs: introduce inmem curseg

2020-07-06 Thread Jaegeuk Kim
Hi Chao, Do you have any brief design doc to present the idea? Thanks, On 06/30, Chao Yu wrote: > Previous implementation of aligned pinfile allocation will: > - allocate new segment on cold data log no matter whether last used > segment is partially used or not, it makes IOs more random; > -

Re: [PATCH RFC 2/5] f2fs: record average update time of segment

2020-07-01 Thread Jaegeuk Kim
On 06/30, Chao Yu wrote: > Previously, once we update one block in segment, we will update mtime of > segment to last time, making aged segment becoming freshest, result in > that GC with cost benefit algorithm missing such segment, So this patch > changes to record mtime as average block updating

Re: [PATCH -next] f2fs: make __allocate_new_segment() static

2020-07-01 Thread Jaegeuk Kim
On 07/01, Wei Yongjun wrote: > From: Hulk Robot > > From: Hulk Robot > > Fix sparse build warning: > > fs/f2fs/segment.c:2736:6: warning: > symbol '__allocate_new_segment' was not declared. Should it be static? It was fixed.

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-07-01 Thread Jaegeuk Kim
On 07/01, Chao Yu wrote: > On 2020/7/1 9:59, Chao Yu wrote: > > On 2020/7/1 4:56, Jaegeuk Kim wrote: > >> On 06/30, Nathan Chancellor wrote: > >>> On Mon, Jun 29, 2020 at 01:27:20PM -0700, Jaegeuk Kim wrote: > >>>> If two readahead threads having same

Re: [f2fs-dev] [PATCH v4] f2fs: avoid readahead race condition

2020-07-01 Thread Jaegeuk Kim
>From 3634864095bd1aafbb60ff49dac7d13ce157b658 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 22 Jun 2020 23:01:05 -0700 Subject: [PATCH] f2fs: avoid readahead race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If two readah

Re: [PATCH 1/2] f2fs: split f2fs_allocate_new_segments()

2020-06-30 Thread Jaegeuk Kim
On 07/01, Chao Yu wrote: > Jaegeuk, could you please help to change __allocate_new_segment() to static > in your tree? Sure. :) > > On 2020/6/30 4:19, Jaegeuk Kim wrote: > > On 06/22, Chao Yu wrote: > >> to two independent functions: > >> - f2fs_allocate_new_

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-06-30 Thread Jaegeuk Kim
On 06/30, Nathan Chancellor wrote: > On Mon, Jun 29, 2020 at 01:27:20PM -0700, Jaegeuk Kim wrote: > > If two readahead threads having same offset enter in readpages, every read > > IOs are split and issued to the disk which giving lower bandwidth. > > > > This pat

Re: [f2fs-dev] [PATCH v2] f2fs: avoid readahead race condition

2020-06-29 Thread Jaegeuk Kim
On 06/29, Eric Biggers wrote: > On Mon, Jun 29, 2020 at 08:03:23AM -0700, Jaegeuk Kim wrote: > > If two readahead threads having same offset enter in readpages, every read > > IOs are split and issued to the disk which giving lower bandwidth. > > > > This patch tries t

Re: [PATCH v2] f2fs: avoid readahead race condition

2020-06-29 Thread Jaegeuk Kim
If two readahead threads having same offset enter in readpages, every read IOs are split and issued to the disk which giving lower bandwidth. This patch tries to avoid redundant readahead calls. Signed-off-by: Jaegeuk Kim --- v2: - add missing code to bypass read fs/f2fs/data.c | 18

Re: [f2fs-dev] [PATCH v3] f2fs: avoid readahead race condition

2020-06-29 Thread Jaegeuk Kim
If two readahead threads having same offset enter in readpages, every read IOs are split and issued to the disk which giving lower bandwidth. This patch tries to avoid redundant readahead calls. Signed-off-by: Jaegeuk Kim --- v3: - use READ|WRITE_ONCE v2: - add missing code to bypass read

Re: [PATCH 1/2] f2fs: split f2fs_allocate_new_segments()

2020-06-29 Thread Jaegeuk Kim
On 06/22, Chao Yu wrote: > to two independent functions: > - f2fs_allocate_new_segment() for specified type segment allocation > - f2fs_allocate_new_segments() for all data type segments allocation > > Signed-off-by: Chao Yu > --- > fs/f2fs/f2fs.h | 3 ++- > fs/f2fs/file.c | 2 +- >

Re: [PATCH 5/5] f2fs: show more debug info for per-temperature log

2020-06-24 Thread Jaegeuk Kim
On 06/18, Chao Yu wrote: > - Add to account and show per-log dirty_seg, full_seg and valid_blocks > in debugfs. > - reformat printed info. > > TYPEsegnosecno zoneno dirty_seg full_seg valid_blk > - COLD data: 1523 1523 1523 1 0

Re: [PATCH 1/5] f2fs: fix to wait page writeback before update

2020-06-24 Thread Jaegeuk Kim
On 06/22, Chao Yu wrote: > On 2020/6/22 0:38, Jaegeuk Kim wrote: > > On 06/20, Chao Yu wrote: > >> On 2020/6/20 6:47, Jaegeuk Kim wrote: > >>> On 06/19, Chao Yu wrote: > >>>> On 2020/6/19 13:49, Jaegeuk Kim wrote: > >>>>> On 06/19, Cha

[PATCH] f2fs: avoid readahead race condition

2020-06-23 Thread Jaegeuk Kim
If two readahead threads having same offset enter in readpages, every read IOs are split and issued to the disk which giving lower bandwidth. This patch tries to avoid redundant readahead calls. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 15 +++ fs/f2fs/f2fs.h | 1 + fs

Re: [PATCH 1/5] f2fs: fix to wait page writeback before update

2020-06-21 Thread Jaegeuk Kim
On 06/20, Chao Yu wrote: > On 2020/6/20 6:47, Jaegeuk Kim wrote: > > On 06/19, Chao Yu wrote: > >> On 2020/6/19 13:49, Jaegeuk Kim wrote: > >>> On 06/19, Chao Yu wrote: > >>>> Hi Jaegeuk, > >>>> > >>>> On 2020/6/19 7:59,

Re: [PATCH 1/5] f2fs: fix to wait page writeback before update

2020-06-19 Thread Jaegeuk Kim
On 06/19, Chao Yu wrote: > On 2020/6/19 13:49, Jaegeuk Kim wrote: > > On 06/19, Chao Yu wrote: > >> Hi Jaegeuk, > >> > >> On 2020/6/19 7:59, Jaegeuk Kim wrote: > >>> Hi Chao, > >>> > >>> On 06/18, Chao Yu wrote: > >>&

Re: [PATCH 3/5] f2fs: shrink node_write lock coverage

2020-06-18 Thread Jaegeuk Kim
On 06/18, Chao Yu wrote: > - to avoid race between checkpoint and quota file writeback, it > just needs to hold read lock of node_write in writeback path. > - node_write lock has covered all LFS data write paths, it's not > necessary, we only need to hold node_write lock at write path of > quota

Re: [PATCH 1/5] f2fs: fix to wait page writeback before update

2020-06-18 Thread Jaegeuk Kim
On 06/19, Chao Yu wrote: > Hi Jaegeuk, > > On 2020/6/19 7:59, Jaegeuk Kim wrote: > > Hi Chao, > > > > On 06/18, Chao Yu wrote: > >> to make page content stable for special device like raid. > > > > Could you elaborate the problem a bit?

Re: [PATCH] f2fs: fix to document reserved special compression extension

2020-06-18 Thread Jaegeuk Kim
On 06/19, Chao Yu wrote: > There is one reserved special compression extension: '*', which > could be set via 'compress_extension="*"' mount option to enable > compression for all files. Thank you for the patch. :) > > Signed-off-by: Chao Yu > --- > Documentation/filesystems/f2fs.rst | 2 ++ >

Re: [PATCH 1/5] f2fs: fix to wait page writeback before update

2020-06-18 Thread Jaegeuk Kim
Hi Chao, On 06/18, Chao Yu wrote: > to make page content stable for special device like raid. Could you elaborate the problem a bit? > > Signed-off-by: Chao Yu > --- > fs/f2fs/dir.c | 2 ++ > fs/f2fs/extent_cache.c | 18 +- > fs/f2fs/f2fs.h | 2 +- >

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