Re: [PATCH v11 1/2] scsi: ufs: Enable power management for wlun

2021-03-12 Thread Jaegeuk Kim
On 03/11, Asutosh Das wrote: > During runtime-suspend of ufs host, the scsi devices are > already suspended and so are the queues associated with them. > But the ufs host sends SSU to wlun during its runtime-suspend. > During the process blk_queue_enter checks if the queue is not in > suspended sta

Re: [PATCH] scsi: ufs: Fix some problems in task management request implementation

2021-01-20 Thread Jaegeuk Kim
fshcd_issue_tm_cmd(), it is not right to use hba->nutrs + > req->tag as the Task Tag in one TMR UPIU. > Fix: Directly use req->tag as Task Tag. > > Cc: Jaegeuk Kim > Signed-off-by: Can Guo > > --- > > This change is based on Jaegeuk's chang

Re: [LTP] [f2fs] 02eb84b96b: ltp.swapon03.fail

2021-03-10 Thread Jaegeuk Kim
e selected by f2fs gc. > > > > > When > > > > > gc_pin_file_threshold is reached, the address of swapfile may > > > > > change, > > > > > but won't be synchronized to swap_extent, so swap will write to > > > >

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

2021-03-10 Thread Jaegeuk Kim
On 03/09, Chao Yu wrote: > On 2021/3/9 8:01, Jaegeuk Kim wrote: > > On 03/05, Chao Yu wrote: > > > On 2021/3/5 4:20, Jaegeuk Kim wrote: > > > > On 02/27, Jaegeuk Kim wrote: > > > > > On 02/04, Chao Yu wrote: > > > > > > Jae

Re: [f2fs-dev] [PATCH 3/3] f2fs: check if swapfile is section-alligned

2021-03-02 Thread Jaegeuk Kim
On 03/01, Chao Yu wrote: > Hi Jianan, Merged 1/3 and 2/3, so please post v2 on 3/3. Thanks, > > On 2021/2/27 20:02, Huang Jianan via Linux-f2fs-devel wrote: > > If the swapfile isn't created by pin and fallocate, it cann't be > > Typo: > > can't > > > guaranteed section-aligned, so it may be

Re: [f2fs-dev] [PATCH 3/3] f2fs: check if swapfile is section-alligned

2021-03-02 Thread Jaegeuk Kim
On 03/01, Jaegeuk Kim wrote: > On 03/01, Chao Yu wrote: > > Hi Jianan, > > Merged 1/3 and 2/3, so please post v2 on 3/3. NVM. Found v2. > > Thanks, > > > > > On 2021/2/27 20:02, Huang Jianan via Linux-f2fs-devel wrote: > > > If the swapfile isn

[PATCH] f2fs: expose # of overprivision segments

2021-03-02 Thread Jaegeuk Kim
This is useful when checking conditions during checkpoint=disable in Android. Signed-off-by: Jaegeuk Kim --- fs/f2fs/sysfs.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index e38a7f6921dd..254b6fa17406 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs

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

2021-03-02 Thread Jaegeuk Kim
On 03/02, Chao Yu wrote: > On 2021/3/2 13:42, Jaegeuk Kim wrote: > > This is useful when checking conditions during checkpoint=disable in > > Android. > > This sysfs entry is readonly, how about putting this at > /sys/fs/f2fs//stat/? Urg.. "stat" is a bit c

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

2021-03-02 Thread Jaegeuk Kim
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 in > > > Android. > > > > This sysfs entry is readonly, how about putting this at &g

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

2021-03-08 Thread Jaegeuk Kim
On 03/05, Chao Yu wrote: > On 2021/3/5 4:20, Jaegeuk Kim wrote: > > 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 &

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

2021-03-08 Thread Jaegeuk Kim
On 03/05, Chao Yu wrote: > On 2021/3/5 1:50, Jaegeuk Kim wrote: > > 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/

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

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

[PATCH] f2fs: flush data when enabling checkpoint back

2021-01-26 Thread Jaegeuk Kim
;f2fs: checkpoint disabling") Cc: sta...@vger.kernel.org Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 359cc5a2f8f5..073b51af62c8 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1887

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

2021-01-15 Thread Jaegeuk Kim
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: > > > > [58690.961685] F2FS-fs (vdb) : inject page get in > > > > f2fs_pagecache_get_page of f2fs_quota_write+0x15

[PATCH] scsi: ufs: fix livelock of ufshcd_clear_ua_wluns

2021-01-05 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 --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

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

2021-01-05 Thread Jaegeuk Kim
; ufshcd_clear_ua_wluns() -> stuck > >ufshcd_scsi_unblock_requests() > > > > In order to avoid it, ufshcd_clear_ua_wluns() can be called per recovery > > flows > > such as suspend/resume, link_recovery, and error_handler. > > > > Fixes: 1918651f2d7e ("scsi: ufs: Clea

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

2021-01-06 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 --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

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

2021-01-06 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 --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

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

2021-01-06 Thread Jaegeuk Kim
From: Jaegeuk Kim This fixes a warning caused by wrong reserve tag usage in __ufshcd_issue_tm_cmd. WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x68/0x70 WARNING: CPU: 4 PID: 157 at block/blk-mq-tag.c:82 blk_mq_get_tag+0x438/0x46c And, in ufshcd_err_handler(), we can avoid to

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

2021-01-06 Thread Jaegeuk Kim
On 12/09, Jaegeuk Kim wrote: > 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? > >

[PATH v3 0/2] Two UFS bug fixes

2021-01-06 Thread Jaegeuk Kim
Change log from v2: - fix build warning

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

2021-01-06 Thread Jaegeuk Kim
From: Jaegeuk Kim This fixes a warning caused by wrong reserve tag usage in __ufshcd_issue_tm_cmd. WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x68/0x70 WARNING: CPU: 4 PID: 157 at block/blk-mq-tag.c:82 blk_mq_get_tag+0x438/0x46c And, in ufshcd_err_handler(), we can avoid to

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

2021-01-06 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 --- drivers/scsi/ufs/ufshcd.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a

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

2021-01-06 Thread Jaegeuk Kim
Hi Chao, With a quick test, this patch causes down_write failure resulting in blocking process. I didn't dig in the bug so, please check the code again. :P On 12/30, Chao Yu wrote: > ThreadA ThreadB > - f2fs_ioc_start_atomic_write > - write > - f2fs_ioc_commi

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

2021-01-06 Thread Jaegeuk Kim
On 01/06, Jaegeuk Kim wrote: > Hi Chao, > > With a quick test, this patch causes down_write failure resulting in blocking > process. I didn't dig in the bug so, please check the code again. :P nvm. I can see it works now. > > On 12/30, Cha

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

2021-01-06 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > On 2021-01-07 05:41, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > This fixes a warning caused by wrong reserve tag usage in > > __ufshcd_issue_tm_cmd. > > > > WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x

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

2021-01-06 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > Hi Jaegeuk, > > On 2021-01-07 05:41, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > This fixes a warning caused by wrong reserve tag usage in > > __ufshcd_issue_tm_cmd. > > > > WARNING: CPU: 7 PID: 7 at block/blk-cor

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

2021-01-06 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > On 2021-01-07 05:41, 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: [PATCH v3 2/2] scsi: ufs: handle LINERESET with correct tm_cmd

2021-01-06 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > On 2021-01-07 14:51, Jaegeuk Kim wrote: > > On 01/07, Can Guo wrote: > > > On 2021-01-07 05:41, Jaegeuk Kim wrote: > > > > From: Jaegeuk Kim > > > > > > > > This fixes a warning caused by wrong reserve tag usage in

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

2021-01-06 Thread Jaegeuk Kim
On 01/07, Can Guo wrote: > On 2021-01-07 14:57, Jaegeuk Kim wrote: > > On 01/07, Can Guo wrote: > > > On 2021-01-07 05:41, Jaegeuk Kim wrote: > > > > When gate_work/ungate_work gets an error during hibern8_enter or exit, > > > > ufshcd_err_handl

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

2021-01-06 Thread Jaegeuk Kim
From: Jaegeuk Kim This fixes a warning caused by wrong reserve tag usage in __ufshcd_issue_tm_cmd. WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x68/0x70 WARNING: CPU: 4 PID: 157 at block/blk-mq-tag.c:82 blk_mq_get_tag+0x438/0x46c And, in ufshcd_err_handler(), we can avoid to

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

2021-01-06 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 --- drivers/scsi/ufs/ufshcd.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --

[PATCH v4 0/2] UFS bug fixes

2021-01-06 Thread Jaegeuk Kim
Change log from v3: - move ufshcd_clear_ua_wluns() after ufshcd_scsi_add_wlus() - remove BLK_MQ_REQ_RESERVED for tm tag - move IO wait to cover all the non-fatal errors

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 15:47, Jaegeuk Kim wrote: > > From: Jaegeuk Kim > > > > This fixes a warning caused by wrong reserve tag usage in > > __ufshcd_issue_tm_cmd. > > > > WARNING: CPU: 7 PID: 7 at block/blk-core.c:630 blk_get_request+0x

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:07, Jaegeuk Kim wrote: > > On 01/07, Can Guo wrote: > > > On 2021-01-07 15:47, Jaegeuk Kim wrote: > > > > From: Jaegeuk Kim > > > > > > > > This fixes a warning caused by wrong reserve tag usage in

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

[GIT PULL] f2fs update for 5.11-rc1

2020-12-16 Thread Jaegeuk Kim
eok Kim (1): 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 f2

Re: [RFC PATCH 2/2] f2fs: simplify free nid management

2014-02-23 Thread Jaegeuk Kim
put_back_free_nid(sbi, new_nid); > return PTR_ERR(page); > } > inline_addr = inline_xattr_addr(page); > @@ -361,7 +361,7 @@ static inline int write_all_xattrs(struct inode *inode, > __u32 hsize, > /* no need

[PATCH 1/2] f2fs: introduce a radix_tree for the free_nid list

2014-02-23 Thread Jaegeuk Kim
This patch introduces a radix tree for the list of free_nids, which enhances the performance on free nid management. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 36 +--- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a

[PATCH 2/2] f2fs: implement a lock-free stat_show

2014-02-23 Thread Jaegeuk Kim
The stat_show is just to show the current status of f2fs. So, we can remove all the there-in locks. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 3 --- fs/f2fs/f2fs.h| 18 +++--- fs/f2fs/segment.h | 27 +++ 3 files changed, 6 insertions(+), 42

[PATCH 3/3] f2fs: add an sysfs entry to control the directory level

2014-02-27 Thread Jaegeuk Kim
: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 7 +++ fs/f2fs/f2fs.h | 3 +++ fs/f2fs/super.c| 7 +++ 3 files changed, 17 insertions(+) diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 8eb06b0..803784e

[PATCH 1/3] f2fs: remove costly bit operations for f2fs_find_entry

2014-02-27 Thread Jaegeuk Kim
It turns out that a bit operation like find_next_bit is not always fast enough for f2fs_find_entry. Instead, it is pretty much simple and fast to traverse each dentries. Signed-off-by: Jaegeuk Kim --- fs/f2fs/dir.c | 32 +--- 1 file changed, 17 insertions(+), 15

[PATCH 2/3] f2fs: introduce large directory support

2014-02-27 Thread Jaegeuk Kim
level hash tables. This patch adds just a facility for this by introducing i_dir_level in f2fs_inode. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 6 -- fs/f2fs/dir.c | 21 - fs/f2fs/f2fs.h | 1 + fs/f2fs/in

[BUG] deadlock on rename_lock

2014-02-27 Thread Jaegeuk Kim
real+0x1d/0x60 [] SYSC_renameat+0x36d/0x3c0 [] ? mntput_no_expire+0x56/0x190 [] ? mntput_no_expire+0x6e/0x190 [] ? mntput_no_expire+0x17/0x190 [] ? mntput+0x24/0x40 [] ? trace_hardirqs_on_thunk+0x3a/0x3f [] SyS_rename+0x1b/0x20 [] system_call_fastpath+0x16/0x1b -- Jaegeuk Kim Sam

[PATCH] f2fs: fix to write node pages with WRITE_SYNC

2014-03-02 Thread Jaegeuk Kim
ed. The performance numbers are like below, which is measured by Alex. 1. 355MB/s ext4 2. 225MB/s f2fs : WRITE for node writes 3. 525MB/s f2fs : WRITE_SYNC for node writes Reported-And-Tested-by: Alex . Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 2 +- 1 file changed, 1 inserti

Re: [f2fs-dev] [PATCH] f2fs: fix incorrect parsing with option string

2014-03-17 Thread Jaegeuk Kim
, > set_opt(sbi, BG_GC); > - else if (!strncmp(name, "off", 3)) > + else if (!strncmp(name, "off", strlen(name))) > clear_opt(sbi, BG_GC); >

[PATCH 2/5] f2fs: avoid small data writes by skipping writepages

2014-03-18 Thread Jaegeuk Kim
This patch introduces nr_pages_to_skip(sbi, type) to determine writepages can be skipped. The dentry, node, and meta pages can be conrolled by F2FS without breaking the FS consistency. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 4 ++-- fs/f2fs/data.c | 4 fs/f2fs/node.c

[PATCH 5/5] f2fs: call f2fs_wait_on_page_writeback instead of native function

2014-03-18 Thread Jaegeuk Kim
If a page is on writeback, f2fs can face with deadlock due to under writepages. This is caused by merging IOs inside f2fs, so if it comes to detect, let's throw merged IOs, which is implemented by f2fs_wait_on_page_writeback. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 6 ++---

[PATCH 3/5] f2fs: increase pages_skipped when skipping writepages

2014-03-18 Thread Jaegeuk Kim
This patch increases pages_skipped when skipping writepages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 11 ++- fs/f2fs/data.c | 6 +- fs/f2fs/node.c | 6 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs

[PATCH 1/5] f2fs: introduce get_dirty_dents for readability

2014-03-18 Thread Jaegeuk Kim
The get_dirty_dents gives us the number of dirty dentry pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 5 + fs/f2fs/inode.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c

[PATCH 4/5] f2fs: introduce nr_pages_to_write for segment alignment

2014-03-18 Thread Jaegeuk Kim
This patch introduces nr_pages_to_write to align page writes to the segment or other operational unit size, which can be tuned according to the system environment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 11 ++- fs/f2fs/data.c | 12 +++- fs/f2fs/node.c

[PATCH 3/5] f2fs: remove unnecessary threshold

2014-03-19 Thread Jaegeuk Kim
The NM_WOUT_THRESHOLD is now obsolete since f2fs starts to control on a basis of the memory footprint. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 8 fs/f2fs/node.c | 5 + fs/f2fs/node.h | 3 --- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/debug.c

[PATCH 1/5] f2fs: avoid to drop nat entries due to the negative nr_shrink

2014-03-19 Thread Jaegeuk Kim
The try_to_free_nats should not receive the negative nr_shrink. Otherwise, it can drop all the nat entries by the while loop. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 707fd20..04450a5

[PATCH 4/5] f2fs: add missing documentation for dir_level

2014-03-19 Thread Jaegeuk Kim
This patch adds missing dir_level documentation. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index 4ac2c25..62dd725 100644

[PATCH 5/5] f2fs: change reclaim rate in percentage

2014-03-19 Thread Jaegeuk Kim
It is more reasonable to determine the reclaiming rate of prefree segments according to the volume size, which is set to 5% by default. For example, if the volume is 128GB, the prefree segments are reclaimed when the number reaches to 6.4GB. Signed-off-by: Jaegeuk Kim --- Documentation

[PATCH 2/5] f2fs: throttle the memory footprint with a sysfs entry

2014-03-19 Thread Jaegeuk Kim
/ 1024) = 10MB. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 6 ++ Documentation/filesystems/f2fs.txt | 4 fs/f2fs/f2fs.h | 1 + fs/f2fs/node.c | 23 --- fs/f2fs/node.h

[PATCH 1/3] f2fs: introduce fi->i_sem to protect fi's info

2014-03-20 Thread Jaegeuk Kim
This patch introduces fi->i_sem to protect fi's info that includes xattr_ver, pino, i_nlink. This enables to remove i_mutex during f2fs_sync_file, resulting in performance improvement when a number of fsync calls are triggered from many concurrent threads. Signed-off-by: Jaegeuk Kim ---

[PATCH 3/3] f2fs: avoid RECLAIM_FS-ON-W warning

2014-03-20 Thread Jaegeuk Kim
/0x180 f2fs_init_acl+0x29/0xcc [f2fs] __f2fs_add_link+0x259/0x710 [f2fs] f2fs_create+0xad/0x1c0 [f2fs] vfs_create+0xed/0x150 do_last+0xd36/0xed0 path_openat+0xc5/0x680 do_filp_open+0x43/0xa0 do_sys_open+0x13c/0x230 SyS_creat+0x1e/0x20 system_call_fastpath+0x16/0x1b Signed-off-by: Jaegeuk

[PATCH 2/3] f2fs: skip unnecessary node writes during fsync

2014-03-20 Thread Jaegeuk Kim
node block. Otherwise, we should do a new node block with the mark for roll-forward recovery. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 2 ++ fs/f2fs/node.c | 37 - fs/f2fs/node.h | 1 + 4 files changed, 32 insertions(+), 9

[PATCH] f2fs: fix not to write data pages on the page reclaiming path

2014-02-18 Thread Jaegeuk Kim
+0x52/0xb0 ? generic_file_aio_write+0x52/0xb0 generic_file_aio_write+0x65/0xb0 do_sync_write+0x5a/0x90 vfs_write+0xc5/0x1f0 SyS_write+0x55/0xa0 system_call_fastpath+0x16/0x1b Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 40 1 file changed, 16

[PATCH] f2fs: fix to do build_stat prior to the recovery procedure

2014-02-19 Thread Jaegeuk Kim
-by: Jaegeuk Kim --- fs/f2fs/super.c | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1a85f83..475560e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -989,28 +989,9 @@ static int

[PATCH] f2fs: drop obsolete node page when it is truncated

2014-01-22 Thread Jaegeuk Kim
If a node page is trucated, we'd better drop the page in the node_inode's page cache for better memory footprint. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index bbfc655..b0649b7 100644 ---

Re: [PATCH 1/2 v2] f2fs: call mark_inode_dirty to flush dirty pages

2014-01-22 Thread Jaegeuk Kim
Chang log from v1: o check and add mark_inode_dirty across the whole paths >From a18ff063406dd6aec41fda598eabe2691007a30d Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Tue, 21 Jan 2014 13:32:12 +0900 Subject: [PATCH 1/2] f2fs: call mark_inode_dirty to flush dirty pages If a dentry page

[GIT PULL] f2fs updates for v3.14

2014-01-22 Thread Jaegeuk Kim
() f2fs: add flags and helpers to support inline data f2fs: add a new mount option: inline_data f2fs: key functions to handle inline data f2fs: handle inline data operations f2fs: update f2fs Documentation Jaegeuk Kim (42): f2fs: add a slab cache entry for small

[PATCH] f2fs: fix to cover io->bio with io_rwsem

2014-04-01 Thread Jaegeuk Kim
In the f2fs_wait_on_page_writeback, io->bio should be covered by io_rwsem. Otherwise, the bio pointer can become a dangling pointer due to data races. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/segment.c b

[PATCH] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue

2014-04-02 Thread Jaegeuk Kim
option can be used under a workload consisting of very intensive concurrent fsync calls, while the storage handles cache_flush commands slowly. Signed-off-by: Jaegeuk Kim --- Documentation/filesystems/f2fs.txt | 4 ++ fs/f2fs/f2fs.h | 16 +++ fs/f2fs/file.c

Re: [PATCH v2] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue

2014-04-03 Thread Jaegeuk Kim
change log from v1: o do not create a flush thread, if the option is not set >From deb512157c4bcae079197eb55590e3e764cedc7f Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 2 Apr 2014 15:34:36 +0900 Subject: [PATCH] f2fs: introduce f2fs_issue_flush to avoid redundant flush issue Cc: li

Re: f2fs: kernel BUG at fs/f2fs/segment.h:543

2014-04-06 Thread Jaegeuk Kim
8b 8d > d0 06 00 00 8b 50 78 8b 80 84 00 00 00 d3 e0 41 39 d6 8d 44 02 ff 73 09 <0f> > 0b 0f 1f 80 00 00 00 00 41 39 c6 76 03 0f 0b 90 48 8d 43 20 > [ 1789.278327] RIP f2fs_submit_page_mbio (fs/f2fs/segment.h:543 > fs/f2fs/data.c:181) > [ 1789.278327] RSP > > > Th

Re: f2fs: kernel BUG at fs/f2fs/segment.h:543

2014-04-06 Thread Jaegeuk Kim
2014-04-06 (일), 21:55 -0400, Sasha Levin: > On 04/06/2014 09:20 PM, Jaegeuk Kim wrote: > > Hi, > > > > Thank you for the report. > > > > If possible, could you share fsck.f2fs or dump.f2fs on the corrupted > > partition? > > > > Otherwise, how

[GIT PULL] f2fs updates for v3.15

2014-04-06 Thread Jaegeuk Kim
ormat segment_info's show for better legibility f2fs: optimize restore_node_summary slightly Jaegeuk Kim (37): f2fs: update_inode_page should be done all the time f2fs: handle dirty segments inside refresh_sit_entry f2fs: fix to recover xattr node block f2fs: remove the ug

[PATCH 1/2] f2fs: improve write performance under frequent fsync calls

2014-01-07 Thread Jaegeuk Kim
is patch improves the random wirte performance with frequent fsync calls by up to 10%. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 4 ++-- fs/f2fs/file.c| 2 +- fs/f2fs/node.c| 7 ++- fs/f2fs/segment.c | 8 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a

[PATCH 2/2] f2fs: add a sysfs entry to control max_victim_search

2014-01-07 Thread Jaegeuk Kim
o control the number dynamically through: /sys/fs/f2fs/$dev/max_victim_search Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 +++ fs/f2fs/gc.c| 4 ++-- fs/f2fs/gc.h| 2 +- fs/f2fs/super.c | 6 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/f2fs.h b/

[PATCH] f2fs: update documents and a MAINTAINERS entry

2014-01-09 Thread Jaegeuk Kim
This patch adds missing some description of sysfs entries in - Documentation/ABI/testing/sysfs-fs-f2fs - Documentation/filesystems/f2fs.txt. And it adds a maintained document entry of F2FS in MAINTAINERS. Signed-off-by: Jaegeuk Kim --- Documentation/ABI/testing/sysfs-fs-f2fs | 31

Re: [f2fs-dev][PATCH V2 0/6] f2fs: Enable f2fs support inline data

2013-11-25 Thread Jaegeuk Kim
A_OFFSET + MAX_INLINE_DATA); + + src_addr = kmap(page); + dst_addr = inline_data_addr(ipage); memcpy(dst_addr, src_addr, size); + kunmap(page); >> ditto. /* Release the first data block if it is allocated */ if (!f2fs_has_inline_data(inode)) { -- 1.8.4

Re: [f2fs-dev] [PATCH] f2fs: remove unneeded code in punch_hole

2013-11-26 Thread Jaegeuk Kim
p; > - i_size_read(inode) <= (offset + len)) { > - i_size_write(inode, offset); > - mark_inode_dirty(inode); > - } > - > return ret; > } > -- Jaegeuk Kim Samsung -- To unsubscribe from this list: send the

[PATCH 1/2] f2fs: remove unnecessary return value

2013-11-26 Thread Jaegeuk Kim
Let's remove the unnecessary return value. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 95d2aba..132bb3f 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -773,13 +773,12 @@ s

Re: [f2fs-dev] [PATCH] f2fs: readahead contiguous pages for restore_node_summary

2013-11-26 Thread Jaegeuk Kim
sum_entry->nid = rn->footer.nid; > + sum_entry->version = 0; > + sum_entry->ofs_in_node = 0; > + sum_entry++; > + } else { > + err = -EIO; > +

RE: [f2fs-dev] [PATCH] f2fs: readahead contiguous pages for restore_node_summary

2013-11-27 Thread Jaegeuk Kim
Hi, 2013-11-27 (수), 15:58 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Wednesday, November 27, 2013 1:30 PM > > To: Chao Yu > > Cc: linux-fsde...@vger.kernel.org; linux-kernel

RE: [f2fs-dev] [PATCH] f2fs: readahead contiguous pages for restore_node_summary

2013-11-27 Thread Jaegeuk Kim
Hi, 2013-11-28 (목), 09:26 +0800, Chao Yu: > Hi Kim, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Wednesday, November 27, 2013 4:19 PM > > To: Chao Yu > > Cc: linux-fsde...@vger.kernel.org; linux-kernel

Re: [f2fs-dev] [PATCH 2/5] f2fs: add unlikely macro for compiler optimization

2013-11-29 Thread Jaegeuk Kim
; - if (page->index > end) > + if (unlikely(page->index > end)) > continue; > > if (ino && ino_of_node(page) == ino) { -- Jaegeuk Kim Samsung -- To unsubscribe from this list

[PATCH] f2fs: remove the own bi_private allocation

2013-11-29 Thread Jaegeuk Kim
ove bi_private now, let's just use bi_private pointer as the completion pointer. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 43 --- fs/f2fs/segment.h | 7 --- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/fs/f2fs/

RE: [f2fs-dev] [PATCH] f2fs: readahead contiguous pages for restore_node_summary

2013-11-29 Thread Jaegeuk Kim
d); > > 2. memcpy(); > > 3. SetPageUptodate(); > > 4. f2fs_put_page(); > > It could be. > > This make ra_node_pages() synchronized, because we should read > node_footer->nid > from updated node page before we cache node pages, and we will still use page

[PATCH] f2fs: refactor bio-related operations

2013-11-29 Thread Jaegeuk Kim
to f2fs_submit_page_bio. 5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and submit_write_page. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c| 14 +- fs/f2fs/data.c | 317 +--- fs/f2fs/f2fs.h

[GIT PULL] f2fs updates for v3.13

2013-11-11 Thread Jaegeuk Kim
: introduce f2fs_kmem_cache_alloc to hide the unfailed, kmem cache allocation Haicheng Li (3): f2fs: use true and false for boolean value f2fs: no need to check other dirty_segmap when the seg has been found f2fs: use bool for booleans Jaegeuk Kim (17): f2fs: avoid

[PATCH] f2fs: avoid to write during the recovery

2013-10-17 Thread Jaegeuk Kim
This patch enhances the recovery routine not to write any data/node/meta until its completion. If any writes are sent to the disk, it could contaminate the written history that will be used for further recovery. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/node.c

Re: [PATCH 5/5] f2fs: move the list_head initialization into the lock protection region

2013-11-19 Thread Jaegeuk Kim
ct list_head *head = &sbi->dir_inode_list; > + struct list_head *head; > struct dir_inode_entry *entry; > struct inode *inode; > retry: > spin_lock(&sbi->dir_inode_lock); > + > + head = &sbi->dir_inode_list; > if (list_empty(he

Re: [PATCH 5/5] f2fs: move the list_head initialization into the lock protection region

2013-11-20 Thread Jaegeuk Kim
Ok, got it. Thanks, :) 2013-11-20 (수), 17:48 +0800, Gu Zheng: > Hi Kim, > On 11/20/2013 09:31 AM, Jaegeuk Kim wrote: > > > Hi Gu, > > > > IMO, there is no reason to cover the list header by the lock. > > In any flows, sbi should have the header all the time. &g

Re: [f2fs-dev] [PATCH V2 2/2 RESEND] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-20 Thread Jaegeuk Kim
> + e->valid_blocks += se->valid_blocks; > + } > } > - } > + start_blk += readed; > + } while (start_blk < sit_blk_cnt); > } > > static void init_free_segmap(struct f2fs_sb_info *sbi) > d

Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-22 Thread Jaegeuk Kim
rge judgements/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng >suggested. > o add mark_page_accessed() before release page to delay VM reclaiming. > o remove '*order' for simplification of function as Jaegeuk Kim sugges

Re: [f2fs-dev] [PATCH] f2fs: merge read IOs at ra_nat_pages()

2013-11-23 Thread Jaegeuk Kim
Hi, 2013-11-22 (금), 12:41 +0900, Changman Lee: > How about doing mark_page_accessed(page) in ra_nat_pages like > ra_sit_pages to prevent readahead pages are reclaimed by VM? Agreed. I'll modify and merge this. Thanks, > > On 목, 2013-11-21 at 18:35 +0900, Jaegeuk Kim wrot

Re: [f2fs-dev] [PATCH 1/2] f2fs: adds a tracepoint for submit_read_page

2013-11-23 Thread Jaegeuk Kim
int for submit_read_page. Signed-off-by: Chao Yu [Jaegeuk Kim: integrate tracepoints of f2fs_submit_read(_write)_page] Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 1 + fs/f2fs/segment.c | 2 +- include/trace/events/f2fs.h | 25 + 3 files chan

Re: [f2fs-dev] [PATCH 2/2] f2fs: adds a tracepoint for f2fs_submit_read_bio

2013-11-23 Thread Jaegeuk Kim
s a tracepoint for f2fs_submit_read_bio. Signed-off-by: Chao Yu [Jaegeuk Kim: integrate tracepoints of f2fs_submit_read(_write)_bio] Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 2 ++ fs/f2fs/segment.c | 5 +++-- include/trace/events/f2fs.h |

RE: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-23 Thread Jaegeuk Kim
Hi, 2013-11-23 (토), 10:53 +0800, Chao Yu: > Hi, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaegeuk@samsung.com] > > Sent: Friday, November 22, 2013 5:11 PM > > To: Chao Yu > > Cc: linux-fsde...@vger.kernel.org; linux-kernel

Re: [f2fs-dev] [PATCH V3 2/2] f2fs: read contiguous sit entry pages by merging for mount performance

2013-11-23 Thread Jaegeuk Kim
/use 'Continue' or 'Break' instead of 'Goto' as Gu Zheng >suggested. > o add mark_page_accessed() before release page to delay VM reclaiming. > o remove '*order' for simplification of function as Jaegeuk Kim sugges

[PATCH] f2fs: avoid lock debugging overhead

2013-11-23 Thread Jaegeuk Kim
If CONFIG_F2FS_CHECK_FS is unset, we don't need to add any debugging overhead. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 72718ef..417280a 100644 --- a/fs/f2fs/f2fs.h +++ b/fs

[PATCH] f2fs: add detailed information of bio types in the tracepoints

2013-11-23 Thread Jaegeuk Kim
This patch inserts information of bio types in more detail. So, we can now see REQ_META and REQ_PRIO too. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 4 ++-- include/trace/events/f2fs.h | 22 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git

Re: [f2fs-dev][PATCH V2 4/6] f2fs: Key functions to handle inline data

2013-11-25 Thread Jaegeuk Kim
Hi Huajun, 2013-11-20 (수), 20:51 +0800, Huajun Li: > On Fri, Nov 15, 2013 at 3:49 PM, Jaegeuk Kim wrote: > > Hi Huajun, > > > > [snip] > > > >> +static int __f2fs_convert_inline_data(struct inode *inode, struct page > >> *page) > >>

Re: [f2fs-dev][PATCH V2 3/6] f2fs: Add a new function: f2fs_reserve_block()

2013-11-25 Thread Jaegeuk Kim
ret = get_dnode_of_data(&dn, index, ALLOC_NODE); > - if (ret) { > - f2fs_unlock_op(sbi); > + ret = f2fs_reserve_block(&dn, index); > + f2fs_unlock_op(sbi); > + if (ret) > break; > - } > > - if

[PATCH] f2fs: remove unnecessary segment bitmap updates

2013-10-27 Thread Jaegeuk Kim
From: Changman Lee From: Changman Lee Only one dirty type is set in __locate_dirty_segment and we can know dirty type of segment. So we don't need to check other dirty types. Signed-off-by: Changman Lee Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c

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