Re: [PATCH] f2fs: split discard command in prior to block layer

2018-07-06 Thread Jaegeuk Kim
On 07/07, Chao Yu wrote: > Hi Jaegeuk, > > On 2018/7/7 6:45, Jaegeuk Kim wrote: > > On 07/04, Chao Yu wrote: > >> From: Chao Yu > >> > >> Some devices has small max_{hw,}discard_sectors, so that in > >> __blkdev_issue_discard(), one big size dis

Re: [PATCH v2] f2fs: Fix deadlock in shutdown ioctl

2018-05-17 Thread Jaegeuk Kim
On 05/17, Chao Yu wrote: > On 2018/5/17 16:03, Sahitya Tummala wrote: > > f2fs_ioc_shutdown() ioctl gets stuck in the below path > > when issued with F2FS_GOING_DOWN_FULLSYNC option. > > > > __switch_to+0x90/0xc4 > > percpu_down_write+0x8c/0xc0 > > freeze_super+0xec/0x1e4 > > freeze_bdev+0xc4/0xcc

Re: [f2fs-dev] [PATCH v3] f2fs: fix performance issue observed with multi-thread sequential read

2018-08-14 Thread Jaegeuk Kim
On 08/14, Chao Yu wrote: > On 2018/8/14 12:04, Jaegeuk Kim wrote: > > On 08/14, Chao Yu wrote: > >> On 2018/8/14 4:11, Jaegeuk Kim wrote: > >>> On 08/13, Chao Yu wrote: > >>>> Hi Jaegeuk, > >>>> > >>>> On 2018/8/11 2:56, J

Re: [PATCH v2] f2fs: remove codes of unused wio_mutex

2018-12-12 Thread Jaegeuk Kim
On 12/12, Yunlong Song wrote: > v1->v2: delete comments in f2fs.h: "/* bio ordering for NODE/DATA */" It's quite late for me to rebase the repo. Could you please send another patch for this? > > Signed-off-by: Yunlong Song > Reviewed-by: Chao Yu > Signed-off-

Re: [f2fs-dev] [PATCH] f2fs: add an ioctl() to explicitly trigger fsck later

2018-12-12 Thread Jaegeuk Kim
On 12/07, Chao Yu wrote: > On 2018/12/1 4:36, Jaegeuk Kim wrote: > > On 11/30, Chao Yu wrote: > >> On 2018/11/29 9:52, Jaegeuk Kim wrote: > >>> This adds an option in ioctl(F2FS_IOC_SHUTDOWN) in order to trigger fsck > >>> by > >>> setting a

[PATCH 3/3] f2fs: flush stale issued discard candidates

2018-12-13 Thread Jaegeuk Kim
Sometimes, I could observe # of issuing_discard to be 1 which blocks background jobs due to is_idle()=false. The only way to get out of it was to trigger gc_urgent. This patch avoids that by checking any candidates as done in the list. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 4

[PATCH 2/3] f2fs: correct wrong spelling, issing_*

2018-12-13 Thread Jaegeuk Kim
Let's use "queued" instead of "issuing". Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 4 ++-- fs/f2fs/f2fs.h| 10 +- fs/f2fs/segment.c | 26 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/fs/f2fs/debug.

[PATCH 1/3] f2fs: use kvmalloc, if kmalloc is failed

2018-12-13 Thread Jaegeuk Kim
) from [] (vfs_kern_mount+0x78/0x134) (vfs_kern_mount) from [] (do_mount+0x474/0xca4) (do_mount) from [] (SyS_mount+0x94/0xbc) (SyS_mount) from [] (ret_fast_syscall+0x0/0x48) Signed-off-by: Jaegeuk Kim --- fs/f2fs/acl.c| 6 ++-- fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 2

Re: [PATCH v2] loop: drop caches if offset or block_size are changed

2018-12-17 Thread Jaegeuk Kim
ffset on the loop file 3) mount is failed due to the cached pages having wrong superblock Cc: Jens Axboe Cc: linux-bl...@vger.kernel.org Reported-by: Martijn Coenen Signed-off-by: Jaegeuk Kim --- v1 to v2: - cover block_size change drivers/block/loop.c | 15 +++ 1 file change

[PATCH] f2fs: fix missing unlock(sbi->gc_mutex)

2018-12-17 Thread Jaegeuk Kim
This fixes missing unlock call. Cc: 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 b79677639108..2689a2cb56cc 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1462,6 +1462,9 @@ static int

[PATCH] dm: give req_size precisely given by user

2018-12-18 Thread Jaegeuk Kim
This patch makes dm be aware of io_pages to assign sane req_size for reads. Cc: sta...@vger.kernel.org Cc: Jens Axboe Cc: Alasdair Kergon Cc: Mike Snitzer Cc: dm-de...@redhat.com Fixes: 9491ae4a ("mm: don't cap request size based on read-ahead setting") Signed-off-by: Jaegeuk Ki

Re: dm: give req_size precisely given by user

2018-12-18 Thread Jaegeuk Kim
On 12/18, Mike Snitzer wrote: > On Tue, Dec 18 2018 at 12:45pm -0500, > Jens Axboe wrote: > > > On 12/18/18 10:25 AM, Jaegeuk Kim wrote: > > > This patch makes dm be aware of io_pages to assign sane req_size for > > > reads. > > > > Reviewed-by:

Re: [PATCH v3] loop: drop caches if offset or block_size are changed

2018-12-18 Thread Jaegeuk Kim
ffset on the loop file 3) mount is failed due to the cached pages having wrong superblock Cc: Jens Axboe Cc: linux-bl...@vger.kernel.org Reported-by: Martijn Coenen Signed-off-by: Jaegeuk Kim --- v2 -> v3: - avoid to submit IOs on frozen mq Jens, how about this? Thanks, drivers/block/loo

Re: [f2fs-dev] [PATCH 3/3] f2fs: flush stale issued discard candidates

2018-12-18 Thread Jaegeuk Kim
On 12/18, Chao Yu wrote: > On 2018/12/14 13:01, Jaegeuk Kim wrote: > > Sometimes, I could observe # of issuing_discard to be 1 which blocks > > background > > jobs due to is_idle()=false. > > The only way to get out of it was to trigger gc_urgent. This patch avoids &

Re: [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2018-12-18 Thread Jaegeuk Kim
On 12/18, Chao Yu wrote: > On 2018/12/14 22:25, Jaegeuk Kim wrote: > > On 12/14, Sahitya Tummala wrote: > >> On Wed, Dec 12, 2018 at 11:36:08AM +0800, Chao Yu wrote: > >>> On 2018/12/12 11:17, Sahitya Tummala wrote: > >>>> On Fri, Dec 07, 2018 at 05:47:

Re: [PATCH v2] f2fs: fix missing unlock(sbi->gc_mutex)

2018-12-18 Thread Jaegeuk Kim
This fixes missing unlock call. Cc: Signed-off-by: Jaegeuk Kim --- v1 -> v2: - clean up fs/f2fs/super.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index b79677639108..cec7ef27b389 100644 --- a/fs/f2fs/super.c +++ b/fs/f

Re: [f2fs-dev] [PATCH v2] f2fs: add bio cache for IPU

2018-12-18 Thread Jaegeuk Kim
On 12/14, Jaegeuk Kim wrote: > On 12/14, Chao Yu wrote: > > Hi Jaegeuk, > > > > I guess ("f2fs: clear PG_writeback if IPU failed") and v2 patch can fix > > hang issue caused by v1 one, could you please have a try with v2? > > Sure. Hang again. I&

Re: [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2018-12-19 Thread Jaegeuk Kim
On 12/19, Chao Yu wrote: > On 2018/12/19 6:47, Jaegeuk Kim wrote: > > On 12/18, Chao Yu wrote: > >> On 2018/12/14 22:25, Jaegeuk Kim wrote: > >>> On 12/14, Sahitya Tummala wrote: > >>>> On Wed, Dec 12, 2018 at 11:36:08AM +0800, Chao Yu wrote: >

Re: [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2018-12-14 Thread Jaegeuk Kim
On 12/14, Sahitya Tummala wrote: > On Wed, Dec 12, 2018 at 11:36:08AM +0800, Chao Yu wrote: > > On 2018/12/12 11:17, Sahitya Tummala wrote: > > > On Fri, Dec 07, 2018 at 05:47:31PM +0800, Chao Yu wrote: > > >> On 2018/12/1 4:33, Jaegeuk Kim wrote: > >

Re: [PATCH v2] f2fs: add bio cache for IPU

2018-12-14 Thread Jaegeuk Kim
On 12/14, Chao Yu wrote: > Hi Jaegeuk, > > I guess ("f2fs: clear PG_writeback if IPU failed") and v2 patch can fix > hang issue caused by v1 one, could you please have a try with v2? Sure. > > Thanks, > > On 2018/11/19 11:29, Chao Yu wrote: > > SQLite in Wal mode may trigger sequential IPU wri

[PATCH] loop: drop caches if offset is changed

2018-12-14 Thread Jaegeuk Kim
ailed due to the cached pages having wrong superblock This patch drops caches when we change lo->offset. Cc: Jens Axboe Cc: linux-bl...@vger.kernel.org Reported-by: Martijn Coenen Signed-off-by: Jaegeuk Kim --- drivers/block/loop.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

Re: [f2fs-dev] [PATCH] f2fs: export pin_file flag to user

2019-01-04 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2019/1/4 12:19, Jaegeuk Kim wrote: > > This exports pin_file status to user. > > Semantics of pin_file flag is the same as nocow flag which is more widely > used in lsattr/chattr and vfs now. > > #define FS_NOCOW_FL 0x008

Re: [PATCH v2] f2fs: fix sbi->extent_list corruption issue

2019-01-04 Thread Jaegeuk Kim
0x1c0/0x3d4 > [ 90.719883] worker_thread+0x224/0x344 > [ 90.723739] kthread+0x120/0x130 > [ 90.727055] ret_from_fork+0x10/0x18 > > I think it is better to cleanup those inodes completely before freeing sbi > and before next retry as done in this patch. Would you lik

Re: [f2fs-dev] [PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA

2019-01-04 Thread Jaegeuk Kim
On 01/04, Chao Yu wrote: > On 2019/1/4 12:20, Jaegeuk Kim wrote: > > Otherwise, we can get wrong counts incurring checkpoint hang. > > > > IO_W (CP: -24, Data: 24, Flush: ( 001), Discard: ( 00)) > > > > Cc: > > Signed-off-by: Jaeg

Re: [PATCH v2] f2fs: export FS_NOCOW_FL flag to user

2019-01-04 Thread Jaegeuk Kim
This exports pin_file status to user. Signed-off-by: Jaegeuk Kim --- v2: - use F2FS_NOCOW_FL (aka FS_NOCOW_FL) fs/f2fs/f2fs.h | 3 ++- fs/f2fs/file.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 12fabd6735dd..9286ec381453 100644

[PATCH] f2fs: export pin_file flag to user

2019-01-03 Thread Jaegeuk Kim
This exports pin_file status to user. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 3 ++- fs/f2fs/file.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 12fabd6735dd..036fd62010c1 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h

[PATCH 1/2] f2fs: wait on atomic writes to count F2FS_CP_WB_DATA

2019-01-03 Thread Jaegeuk Kim
Otherwise, we can get wrong counts incurring checkpoint hang. IO_W (CP: -24, Data: 24, Flush: ( 001), Discard: ( 00)) Cc: Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/file.c b/fs/f2fs

[PATCH 2/2] f2fs: don't access node/meta inode mapping after iput

2019-01-03 Thread Jaegeuk Kim
This fixes wrong access of address spaces of node and meta inodes after iput. Fixes: 60aa4d5536ab ("f2fs: fix use-after-free issue when accessing sbi->stat_info") Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 19 --- fs/f2fs/super.c | 5 + 2 files changed,

Re: [PATCH v3] f2fs: add bio cache for IPU

2018-12-26 Thread Jaegeuk Kim
On 12/24, Chao Yu wrote: > Jaegeuk, > > Will kernel still hang with this v3? I'll consider this later, since it blocked local tests before. > > Thanks, > > On 2018/12/19 17:29, Chao Yu wrote: > > SQLite in Wal mode may trigger sequential IPU write in db-wal file, after > > commit d1b3e72d5490

Re: [PATCH v2] f2fs: rebuild nat_bits during umount

2018-12-26 Thread Jaegeuk Kim
On 12/24, Chao Yu wrote: > On 2018/12/13 16:50, Chao Yu wrote: > > If all free_nat_bitmap are available, we can rebuild nat_bits from > > free_nat_bitmap entirely during umount, let's make another chance > > to reenable nat_bits for image. > > Jaegeuk, > > Could you please have a try with this pa

[PATCH] f2fs: sanity check of xattr entry size

2018-12-26 Thread Jaegeuk Kim
There is a security report where f2fs_getxattr() has a hole to expose wrong memory region when the image is malformed like this. f2fs_getxattr: entry->e_name_len: 4, size: 12288, buffer_size: 16384, len: 4 Cc: Signed-off-by: Jaegeuk Kim --- fs/f2fs/xattr.c | 18 +- 1 f

[GIT PULL] f2fs-for-4.21

2018-12-28 Thread Jaegeuk Kim
nd wait_on_page_writeback f2fs: clean up checkpoint flow f2fs: clean up structure extent_node f2fs: fix to dirty inode synchronously f2fs: check PageWriteback flag for ordered case Jaegeuk Kim (9): f2fs: check memory boundary by insane namelen f2fs: avoid build warn o

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

2018-10-16 Thread Jaegeuk Kim
On 10/16, Stephen Rothwell wrote: > Hi all, > > On Wed, 3 Oct 2018 10:32:22 +1000 Stephen Rothwell > wrote: > > > > After merging the vfs tree, today's linux-next build (x86_64 allmodconfig) > > failed like this: > > > > /home/sfr/next/next/fs/f2fs/super.c: In function 'f2fs_remount': > > /home

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

2021-04-20 Thread Jaegeuk Kim
On 04/20, Chao Yu wrote: > On 2021/4/20 0:57, Jaegeuk Kim wrote: > > 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->allo

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid out-of-bounds memory access

2021-04-20 Thread Jaegeuk Kim
Hi, On 04/20, Salvatore Bonaccorso wrote: > Hi, > > On Tue, Mar 23, 2021 at 02:43:29PM +0800, Chao Yu wrote: > > Hi butt3rflyh4ck, > > > > On 2021/3/23 13:48, butt3rflyh4ck wrote: > > > Hi, I have tested the patch on 5.12.0-rc4+, it seems to fix the problem. > > > > Thanks for helping to test t

Re: [f2fs-dev][PATCH 3/4] f2fs: readahead contiguous current summary blocks in checkpoint

2014-12-08 Thread Jaegeuk Kim
Hi Chao, On Mon, Dec 08, 2014 at 03:01:16PM +0800, Chao Yu wrote: > Let's add readahead code for reading contiguous compact/normal summary blocks > in checkpoint, then we will gain better performance in mount procedure. > > Signed-off-by: Chao Yu > --- > fs/f2fs/checkpoint.c | 2 +- > fs/f2fs/

[GIT PULL] f2fs updates for v3.19

2014-12-09 Thread Jaegeuk Kim
set/clear_bit f2fs: use current_sit_addr to replace the open code Jaegeuk Kim (56): f2fs: do not make dirty any inmemory pages f2fs: invalidate inmemory page f2fs: should truncate any allocated block for inline_data write f2fs: fix race conditon on truncation with inl

[PATCH 3/4] f2fs: remove uncovered code path

2015-01-06 Thread Jaegeuk Kim
This patch removes unnecessary function calls. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 155885b..3e0f5f3 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -563,31

[PATCH 1/4] f2fs: clean up to remove parameter

2015-01-06 Thread Jaegeuk Kim
This patch uses dn->data_blkaddr as a parameter for the destination block address. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 27 ++- fs/f2fs/f2fs.h | 2 +- fs/f2fs/file.c | 3 ++- fs/f2fs/inline.c | 2 +- fs/f2fs/recovery.c | 3 ++- fs/f

[PATCH 4/4] f2fs: align direct_io'ed data to section

2015-01-06 Thread Jaegeuk Kim
age copies. Thus, since f2fs has a section that is well aligned to FTL units, we can align the block address to the section size so that f2fs avoids this misalignment. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c| 7 +-- fs/f2fs/f2fs.h| 3 ++- fs/f2fs/segm

[PATCH 2/4] f2fs: avoid potential unnecessary codes

2015-01-06 Thread Jaegeuk Kim
This patch relocates some operations to avoid unnecessary execution. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 5 +++-- fs/f2fs/node.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 2c0cb66..155885b 100644 --- a/fs/f2fs/data.c

Re: [f2fs-dev][PATCH 1/2] f2fs: get rid of kzalloc in __recover_inline_status

2015-01-06 Thread Jaegeuk Kim
Hi Chao, On Tue, Jan 06, 2015 at 02:28:43PM +0800, Chao Yu wrote: > We use kzalloc to allocate memory in __recover_inline_status, and use this > all-zero memory to check the inline date content of inode page by comparing > them. This is low effective and not needed, let's check inline date content

Re: [f2fs-dev][PATCH 2/2] f2fs: enable recover_xattr_data to avoid cp when fsync after operating xattr

2015-01-06 Thread Jaegeuk Kim
Hi Chao, On Tue, Jan 06, 2015 at 02:29:40PM +0800, Chao Yu wrote: > Now if we call fsync() after we update the xattr date belongs to the file, > f2fs > will do checkpoint to keep data. > This can cause low performance because checkpoint block most operation and > write > lots of blocks. So we'd

Re: [f2fs-dev][PATCH] f2fs: fix wrong memory footprint statistics in debugfs

2015-01-06 Thread Jaegeuk Kim
Hi Chao, On Tue, Jan 06, 2015 at 04:40:49PM +0800, Chao Yu wrote: > Our value of memory footprint statistics showed in debugfs is not calculated > correctly. Fix it in this patch. > > Signed-off-by: Chao Yu > --- > fs/f2fs/debug.c | 15 ++- > 1 file changed, 10 insertions(+), 5 dele

Re: [RFC PATCH] f2fs: add extent cache base on rb-tree

2015-01-06 Thread Jaegeuk Kim
Hi Chao, On Sun, Jan 04, 2015 at 04:24:10PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, December 31, 2014 4:26 PM > > To: Chao Yu > > Cc: 'Changman Lee

[PATCH 1/3] f2fs: fix missing kmem_cache_free

2014-12-04 Thread Jaegeuk Kim
This patch fixes missing kmem_cache_free when handling errors. 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 b1466cf..c59341d 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -158,7

[PATCH 3/3] f2fs: call radix_tree_preload before radix_tree_insert

2014-12-04 Thread Jaegeuk Kim
need to call radix_tree_preload. Otherwise, we should use _GFP_WAIT for the radix tree, and use mutex or semaphore to cover the radix tree operations. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 8 fs/f2fs/gc.c | 6 ++ fs/f2fs/node.c | 6 +++--- 3 files changed

[PATCH 2/3] f2fs: use rw_semaphore for nat entry lock

2014-12-04 Thread Jaegeuk Kim
Previoulsy, we used rwlock for nat_entry lock. But, now we have a lot of complex operations in set_node_addr. (e.g., allocating kernel memories, handling radix_trees, and so on) So, this patches tries to change spinlock to rw_semaphore to give CPUs to other threads. Signed-off-by: Jaegeuk Kim

Re: [PATCH 1/3] f2fs: fix missing kmem_cache_free

2014-12-05 Thread Jaegeuk Kim
Hi Gu, On Fri, Dec 05, 2014 at 11:34:49AM +0800, Gu Zheng wrote: > Hi Jaegeuk, > On 12/05/2014 08:49 AM, Jaegeuk Kim wrote: > > > This patch fixes missing kmem_cache_free when handling errors. > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2

Re: [PATCH 3/3 v2] f2fs: call radix_tree_preload before radix_tree_insert

2014-12-05 Thread Jaegeuk Kim
Change log from v1: o remain GFP_ATOMIC for free_nid list due to its spin_lock >From 769ec6e5b7d4a8115447736871be8bffaaba3a7d Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 3 Dec 2014 20:47:26 -0800 Subject: [PATCH] f2fs: call radix_tree_preload before radix_tree_insert This patch tr

[PATCH 1/5] f2fs: do retry operations with cond_resched

2014-12-06 Thread Jaegeuk Kim
This patch revists retrial paths in f2fs. The basic idea is to use cond_resched instead of retrying from the very early stage. Suggested-by: Gu Zheng Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 7 +++ fs/f2fs/gc.c | 5 ++--- fs/f2fs/node.c| 41

[PATCH 3/5] f2fs: set page private for inmemory pages for truncation

2014-12-06 Thread Jaegeuk Kim
The inmemory pages should be handled by invalidate_page since it needs to be released int the truncation path. Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c79d67e..3ebcf96 100644 --- a/fs/f2fs

[PATCH 2/5] f2fs: count inline_xx in do_read_inode

2014-12-06 Thread Jaegeuk Kim
In do_read_inode, if we failed __recover_inline_status, the inode has inline flag without increasing its count. Later, f2fs_evict_inode will decrease the count, which causes -1. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff

[PATCH 4/5] f2fs: release inmemory pages when the file was closed

2014-12-06 Thread Jaegeuk Kim
If file is closed, let's drop inmemory pages. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 146e58a..b6f3fbf 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -901,6 +901,14 @@ stati

[PATCH 5/5] f2fs: count the number of inmemory pages

2014-12-06 Thread Jaegeuk Kim
This patch adds counting # of inmemory pages in the page cache. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 3 +++ fs/f2fs/f2fs.h| 3 ++- fs/f2fs/segment.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 40b679c..4e2e39c

Re: [f2fs-dev][PATCH] f2fs: cleanup trace event of f2fs_submit_page_{m,}bio with DECLARE_EVENT_CLASS

2014-12-23 Thread Jaegeuk Kim
Hi Chao, Is there a chance to use *fio* as one parameter? Thanks, On Tue, Dec 23, 2014 at 04:35:21PM +0800, Chao Yu wrote: > This patch adds missing parameter _type_ for trace_f2fs_submit_page_bio, then > use DECLARE_EVENT_CLASS/DEFINE_EVENT_CONDITION pair to cleanup some trace > event > code r

Re: [f2fs-dev] [PATCH 6/6] f2fs: avoid double lock for cp_rwsem

2014-12-23 Thread Jaegeuk Kim
On Tue, Dec 23, 2014 at 04:58:46PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, December 23, 2014 3:41 PM > > To: Chao Yu > > Cc: linux-kernel@vger.kernel.org; linu

Re: [f2fs-dev] [PATCH 6/6 v2] f2fs: avoid double lock for cp_rwsem

2014-12-23 Thread Jaegeuk Kim
Change log from v1: o fix description >From fc897d61c01acc19dba434cd4aa29baeb1537b60 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 18 Dec 2014 19:32:36 -0800 Subject: [PATCH] f2fs: avoid double lock for cp_rwsem The __f2fs_add_link is covered by cp_rwsem all the time. This ca

Re: [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-23 Thread Jaegeuk Kim
On Tue, Dec 23, 2014 at 05:35:11PM +0800, Chao Yu wrote: > Hi Changman, > > > -Original Message- > > From: Changman Lee [mailto:cm224@samsung.com] > > Sent: Tuesday, December 23, 2014 12:31 PM > > To: Chao Yu > > Cc: 'Jaegeuk Kim'; linu

[PATCH] f2fs: fix missing cold bit during recovery

2014-12-23 Thread Jaegeuk Kim
-by: Jaegeuk Kim --- fs/f2fs/node.h | 10 +- include/linux/f2fs_fs.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h index fa6f959..cac8a3d 100644 --- a/fs/f2fs/node.h +++ b/fs/f2fs/node.h @@ -212,11 +212,19 @@ static inline

Re: [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-25 Thread Jaegeuk Kim
Hi Chao, On Wed, Dec 24, 2014 at 04:01:16PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, December 23, 2014 3:36 PM > > To: Chao Yu > > Cc: 'Changman Lee

Re: linux-next: Tree for Dec 26 (f2fs)

2014-12-26 Thread Jaegeuk Kim
I fixed the merged patch directly. Changman, The patch was initially made by you, so let me know, if you have objection. Thanks, On Fri, Dec 26, 2014 at 11:17:15AM -0800, Randy Dunlap wrote: > On 12/26/14 00:30, Stephen Rothwell wrote: > > Hi all, > > > > There will only be intermittent release

Re: [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-29 Thread Jaegeuk Kim
Hi Chao, On Mon, Dec 29, 2014 at 03:19:18PM +0800, Chao Yu wrote: [snip] Nice draft. :) > > Please see the draft below. > > 1) Extent management: > If we use global management that managing all extents which are from different > inodes in sbi, we will face with serious lock contention when we

Re: [RFC PATCH] f2fs: add extent cache base on rb-tree

2014-12-31 Thread Jaegeuk Kim
Hi Chao, On Tue, Dec 30, 2014 at 06:10:21PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Tuesday, December 30, 2014 5:23 AM > > To: Chao Yu > > Cc: 'Changman Lee

Re: [f2fs-dev][PATCH 2/2] f2fs: enable recover_xattr_data to avoid cp when fsync after operating xattr

2015-01-22 Thread Jaegeuk Kim
Hi Chao, On Wed, Jan 14, 2015 at 01:01:13PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, January 14, 2015 8:22 AM > > To: Chao Yu > > Cc: 'Changman Lee

[PATCH 1/2] f2fs: trigger correct checkpoint during umount

2015-01-22 Thread Jaegeuk Kim
ag to indicate f2fs_sync_fs is called during umount. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 1 + fs/f2fs/super.c | 12 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c2cf040..1795ce2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f

[PATCH 2/2] f2fs: do checkpoint when umount flag is not set

2015-01-22 Thread Jaegeuk Kim
If the previous checkpoint was done without CP_UMOUNT flag, it needs to do checkpoint with CP_UMOUNT for the next fast boot. Signed-off-by: Jaegeuk Kim --- fs/f2fs/checkpoint.c | 3 ++- fs/f2fs/super.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs

Re: [f2fs-dev][RFC PATCH 03/10] f2fs: introduce f2fs_map_bh to clean codes of check_extent_cache

2015-01-22 Thread Jaegeuk Kim
Hi Chao, On Mon, Jan 12, 2015 at 03:11:04PM +0800, Chao Yu wrote: > This patch introduces f2fs_map_bh to clean codes of check_extent_cache. > > Signed-off-by: Chao Yu > --- > fs/f2fs/data.c | 42 -- > 1 file changed, 28 insertions(+), 14 deletions(-) > >

Re: [f2fs-dev][RFC PATCH 04/10] f2fs: introduce universal lookup/update interface for extent cache

2015-01-22 Thread Jaegeuk Kim
Hi Chao, On Mon, Jan 12, 2015 at 03:12:13PM +0800, Chao Yu wrote: > In this patch, we do these jobs: > 1. rename {check,update}_extent_cache to f2fs_{lookup,update}_extent_info; > 2. introduce universal lookup/update interface of extent cache: > f2fs_{lookup,update}_extent_cache including above tw

Re: [f2fs-dev][RFC PATCH 06/10] f2fs: add core functions for rb-tree extent cache

2015-01-22 Thread Jaegeuk Kim
On Mon, Jan 12, 2015 at 03:14:48PM +0800, Chao Yu wrote: > This patch adds core functions including slab cache init function and > init/lookup/update/shrink/destroy function for rb-tree based extent cache. > > Thank Jaegeuk Kim and Changman Lee as they gave much suggestion about det

Re: [PATCH 1/2] xfs: introduce a generic shutdown ioctl

2015-01-23 Thread Jaegeuk Kim
Hi Dave, Any obejction for this patch? Can I push this patch during the next merge window? Thanks, On Fri, Jan 09, 2015 at 01:34:35AM -0800, Jaegeuk Kim wrote: > This patch introduces a generic ioctl for fs shutdown used by xfs. > > Cc: Dave Chinner > Signed-off-by: Jaegeuk Kim

Re: [f2fs-dev] [PATCH 2/2] f2fs: do checkpoint when umount flag is not set

2015-01-23 Thread Jaegeuk Kim
On Fri, Jan 23, 2015 at 06:39:25PM +0800, Chao Yu wrote: > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, January 23, 2015 8:09 AM > > To: linux-kernel@vger.kernel.org; linux-fsde...@vger.kernel.org; > > linux-f2

Re: [f2fs-dev][RFC PATCH 06/10] f2fs: add core functions for rb-tree extent cache

2015-01-23 Thread Jaegeuk Kim
On Fri, Jan 23, 2015 at 02:15:56PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Friday, January 23, 2015 9:48 AM > > To: Chao Yu > > Cc: Changman Lee; linux-f2fs-de...@list

Re: [f2fs-dev][PATCH 2/2] f2fs: enable recover_xattr_data to avoid cp when fsync after operating xattr

2015-01-13 Thread Jaegeuk Kim
On Mon, Jan 12, 2015 at 05:40:28PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Sunday, January 11, 2015 1:32 PM > > To: Chao Yu > > Cc: 'Changman Lee'; linux-f2fs-

[PATCH 1/2] f2fs: avoid infinite loop on cp_error

2015-01-13 Thread Jaegeuk Kim
If cp_error is set, we should avoid all the infinite loop. In f2fs_sync_file, there is a hole, and this patch fixes that. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a7114858..0d88a28 100644 --- a/fs

[PATCH 2/2] f2fs: update memory footprint information

2015-01-13 Thread Jaegeuk Kim
This patch adds missing memory usages, and splits them in detail. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 24 +--- fs/f2fs/f2fs.h | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index b45daab..0f721f6

[PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
This patch add an ioctl to shutdown f2fs, which stops all the further block writes after this point. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 1 + fs/f2fs/file.c | 14 ++ 2 files changed, 15 insertions(+) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ba30218..febad35

[PATCH 3/6] f2fs: free radix_tree_nodes used by nat_set entries

2015-01-08 Thread Jaegeuk Kim
In the normal case, the radix_tree_nodes are freed successfully. But, when cp_error was detected, we should destroy them forcefully. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 21 +++-- fs/f2fs/node.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a

[PATCH 4/6] f2fs: add nat/sit entries into status

2015-01-08 Thread Jaegeuk Kim
This patch adds NAT/SIT entry informations. Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 8 +--- fs/f2fs/f2fs.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index dd7835b..1f0fb58 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs

[PATCH 6/6] f2fs: add f2fs_destroy_trace_ios to free radix tree

2015-01-08 Thread Jaegeuk Kim
This patch removes radix tree after finishing tracing IOs. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 1 + fs/f2fs/trace.c | 37 + fs/f2fs/trace.h | 2 ++ 3 files changed, 40 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index e6f035c

[PATCH 5/6] f2fs: add spin_lock to cover radix operations in IO tracer

2015-01-08 Thread Jaegeuk Kim
This patch adds spin_lock to cover radix tree operations in IO tracer. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 2 ++ fs/f2fs/trace.c | 18 +++--- fs/f2fs/trace.h | 2 ++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c

[PATCH 1/6] f2fs: fix wrong unlock_page call

2015-01-08 Thread Jaegeuk Kim
This patch removes wrongly called unlock_page. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index b48b355..a7b905c 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -837,7 +837,6 @@ write: /* we should

Re: [PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
On Thu, Jan 08, 2015 at 01:54:20PM -0600, Eric Sandeen wrote: > On 1/8/15 12:10 PM, Jaegeuk Kim wrote: > > This patch add an ioctl to shutdown f2fs, which stops all the further block > > writes after this point. > > would it make sense to just re-use the xfs ioctl nr, if th

Re: [PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
On Fri, Jan 09, 2015 at 07:54:16AM +1100, Dave Chinner wrote: > On Thu, Jan 08, 2015 at 02:33:17PM -0600, Eric Sandeen wrote: > > On 1/8/15 2:18 PM, Jaegeuk Kim wrote: > > > On Thu, Jan 08, 2015 at 01:54:20PM -0600, Eric Sandeen wrote: > > >> On 1/8/15 12:10 PM, J

Re: [PATCH 2/6] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
On Fri, Jan 09, 2015 at 09:04:12AM +1100, Dave Chinner wrote: > On Thu, Jan 08, 2015 at 01:21:29PM -0800, Jaegeuk Kim wrote: > > On Fri, Jan 09, 2015 at 07:54:16AM +1100, Dave Chinner wrote: > > > On Thu, Jan 08, 2015 at 02:33:17PM -0600, Eric Sandeen wrote: > > > >

Re: [f2fs-dev] [PATCH 2/6 v2] f2fs: support goingdown for fs shutdown

2015-01-08 Thread Jaegeuk Kim
: Jaegeuk Kim --- fs/f2fs/file.c | 37 + include/uapi/linux/fs.h | 8 2 files changed, 45 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 5df3367..474fb91 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1020,6 +1020,41

[PATCH] xfs: use generic FS_IOC_GOINGDOWN for ioctl

2015-01-08 Thread Jaegeuk Kim
This patch uses XFS_IOC_GOINGDOWN for a generic ioctl command, FS_IOC_GOINGDOWN. Cc: Dave Chinner Signed-off-by: Jaegeuk Kim --- fs/xfs/xfs_fs.h| 2 +- fs/xfs/xfs_fsops.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index

Re: [PATCH v2] xfs: use generic FS_IOC_GOINGDOWN for ioctl

2015-01-08 Thread Jaegeuk Kim
Change log from v1: o remove the obsolete options. -- >8 -- This patch uses XFS_IOC_GOINGDOWN for a generic ioctl command, FS_IOC_GOINGDOWN. Cc: Dave Chinner Signed-off-by: Jaegeuk Kim --- fs/xfs/xfs_fs.h| 9 + fs/xfs/xfs_fsops.c | 6 +++--- 2 files changed, 4 insertions(+),

[PATCH 1/2] xfs: introduce a generic shutdown ioctl

2015-01-09 Thread Jaegeuk Kim
This patch introduces a generic ioctl for fs shutdown used by xfs. Cc: Dave Chinner Signed-off-by: Jaegeuk Kim --- fs/xfs/xfs_fs.h | 8 include/uapi/linux/fs.h | 8 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index

[PATCH 2/2] f2fs: support fs shutdown

2015-01-09 Thread Jaegeuk Kim
. FS_GOING_DOWN_METASYNC : this will do checkpoint before shutdown. 3. FS_GOING_DOWN_NOSYNC : this will trigger shutdown as is. Signed-off-by: Jaegeuk Kim --- fs/f2fs/file.c | 37 + 1 file changed, 37 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index

Re: [f2fs-dev][PATCH 2/2] f2fs: enable recover_xattr_data to avoid cp when fsync after operating xattr

2015-01-10 Thread Jaegeuk Kim
On Sat, Jan 10, 2015 at 08:08:33PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, January 07, 2015 3:44 AM > > To: Chao Yu > > Cc: Changman Lee; linux-f2fs-de...@list

Re: [f2fs-dev][PATCH] f2fs: fix wrong memory footprint statistics in debugfs

2015-01-10 Thread Jaegeuk Kim
On Sat, Jan 10, 2015 at 08:09:52PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > > -Original Message- > > From: Jaegeuk Kim [mailto:jaeg...@kernel.org] > > Sent: Wednesday, January 07, 2015 3:49 AM > > To: Chao Yu > > Cc: Changman Lee; linux-f2fs-de...@list

[PATCH 1/5] f2fs: fix not to drop mount options when retrying fill_super

2015-01-27 Thread Jaegeuk Kim
If wrong mount option was requested, f2fs tries to fill_super again. But, during the next trial, f2fs has no valid mount options, since parse_options deleted all the separators in the original string. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 15 --- 1 file changed, 12

[PATCH 2/5] f2fs: support norecovery mount option

2015-01-27 Thread Jaegeuk Kim
., xfstests/200) Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index fbc7f5a..0ca1fb2 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -42,6 +42,7 @@ static struct kset *f2fs_kset; enum

[PATCH 3/5] f2fs: avoid write_checkpoint if f2fs is mounted readonly

2015-01-27 Thread Jaegeuk Kim
Do not change any partition when f2fs is changed to readonly mode. 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 79f8281..1ee6162 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs

[PATCH 5/5] f2fs: introduce a batched trim

2015-01-27 Thread Jaegeuk Kim
This patch introduces a batched trimming feature, which submits split discard commands. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 15 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c0b83d6

[PATCH 4/5] f2fs: should fail mount when trying to recover data on read-only dev

2015-01-27 Thread Jaegeuk Kim
If device is read-only, we should not proceed data recovery. But, if the previous checkpoint was done by normal clean shutdown, it's safe to proceed the recovery, since there will be no data to be recovered. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 9 + 1 file chang

Re: [PATCH v3] f2fs: add fast symlink support

2015-03-20 Thread Jaegeuk Kim
> -Original Message- > > From: Wanpeng Li [mailto:wanpeng...@linux.intel.com] > > Sent: Thursday, March 19, 2015 7:02 AM > > To: Jaegeuk Kim > > Cc: Wanpeng Li; Changman Lee; Chao Yu; > > linux-f2fs-de...@lists.sourceforge.net; > > linux-fsde...@vger.kern

Re: [PATCH] f2fs: enable inline data by default

2015-03-20 Thread Jaegeuk Kim
Hi Wanpeng, Indeed. Please don't do this for backward compatibility. Thanks, On Thu, Mar 19, 2015 at 01:11:35PM +0800, Wanpeng Li wrote: > Enable inline_data feature by default since it brings us better > performance and space utilization and now has already stable. > > Signed-off-by: Wanpeng

Re: [PATCH 1/1] f2fs: correctly check empty xattr key

2015-03-20 Thread Jaegeuk Kim
Hi Taesoo, On Fri, Mar 20, 2015 at 12:19:07AM -0400, Taesoo Kim wrote: > When xattr name (key) is empty (""), correctly return -EINVAL > error. xattr_advise_set/get() seem to make the same mistake. The intention here is to disallow any xattr name, since this is used to get or set the i_advise val

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