Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Chao has pointed out that, maybe writebacking dentry page can redirty dnode page which may be clean previously, so it is more safe to call f2fs_balance_fs to make sure dirty metadatas of filesystem will not exceed the threshold. On 2017/8/4 11:34, Jaegeuk Kim wrote: On 08/04, Yunlong Song

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Chao has pointed out that, maybe writebacking dentry page can redirty dnode page which may be clean previously, so it is more safe to call f2fs_balance_fs to make sure dirty metadatas of filesystem will not exceed the threshold. On 2017/8/4 11:34, Jaegeuk Kim wrote: On 08/04, Yunlong Song

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Jaegeuk Kim
On 08/04, Yunlong Song wrote: > Since __write_data_page will not do f2fs_balance_fs for dir inode, so there > is no lock. > - f2fs_balance_fs > - __write_data_page (dir inode) > - f2fs_balance_fs again?<- Can not happen! > And if let sync_dirty_inodes flush dentry page of inodeB,

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Jaegeuk Kim
On 08/04, Yunlong Song wrote: > Since __write_data_page will not do f2fs_balance_fs for dir inode, so there > is no lock. > - f2fs_balance_fs > - __write_data_page (dir inode) > - f2fs_balance_fs again?<- Can not happen! > And if let sync_dirty_inodes flush dentry page of inodeB,

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Since __write_data_page will not do f2fs_balance_fs for dir inode, so there is no lock. - f2fs_balance_fs - __write_data_page (dir inode) - f2fs_balance_fs again?<- Can not happen! And if let sync_dirty_inodes flush dentry page of inodeB, then inodeB will sikp the

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Since __write_data_page will not do f2fs_balance_fs for dir inode, so there is no lock. - f2fs_balance_fs - __write_data_page (dir inode) - f2fs_balance_fs again?<- Can not happen! And if let sync_dirty_inodes flush dentry page of inodeB, then inodeB will sikp the

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Since __write_data_page will not do f2fs_balance_fs for dir inode, so there is no lock. - f2fs_balance_fs - __write_data_page (dir inode) - f2fs_balance_fs again?<- Can not happen! And if let sync_dirty_inodes flush dentry page of inodeB, then inodeB will sikp the

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Yunlong Song
Since __write_data_page will not do f2fs_balance_fs for dir inode, so there is no lock. - f2fs_balance_fs - __write_data_page (dir inode) - f2fs_balance_fs again?<- Can not happen! And if let sync_dirty_inodes flush dentry page of inodeB, then inodeB will sikp the

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Jaegeuk Kim
On 08/02, Yunlong Song wrote: > Hi Jay, > The case is like this: > write_checkpoint: normal dentry > page writeback of inodeB: > -block_operations -f2fs_write_data_pages > -SBI_BLOCK_OPS is set -f2fs_write_cache_pages >

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-03 Thread Jaegeuk Kim
On 08/02, Yunlong Song wrote: > Hi Jay, > The case is like this: > write_checkpoint: normal dentry > page writeback of inodeB: > -block_operations -f2fs_write_data_pages > -SBI_BLOCK_OPS is set -f2fs_write_cache_pages >

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-02 Thread Yunlong Song
Hi Jay, The case is like this: write_checkpoint: normal dentry page writeback of inodeB: -block_operations -f2fs_write_data_pages -SBI_BLOCK_OPS is set -f2fs_write_cache_pages -sync_dirty_inodes -__write_data_page

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-02 Thread Yunlong Song
Hi Jay, The case is like this: write_checkpoint: normal dentry page writeback of inodeB: -block_operations -f2fs_write_data_pages -SBI_BLOCK_OPS is set -f2fs_write_cache_pages -sync_dirty_inodes -__write_data_page

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Jaegeuk Kim
On 08/01, Yunlong Song wrote: > Hi Jay, > The SBI_BLOCK_OPS can not cover all the case, once SBI_BLOCK_OPS is set, > all the normal writeback > (before the SBI_BLOCK_OPS is clear) of dentry pages which do not come from > write_checkpoint flow will > totally miss all the f2fs_balance_fs check.

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Jaegeuk Kim
On 08/01, Yunlong Song wrote: > Hi Jay, > The SBI_BLOCK_OPS can not cover all the case, once SBI_BLOCK_OPS is set, > all the normal writeback > (before the SBI_BLOCK_OPS is clear) of dentry pages which do not come from > write_checkpoint flow will > totally miss all the f2fs_balance_fs check.

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Yunlong Song
Hi Jay, The SBI_BLOCK_OPS can not cover all the case, once SBI_BLOCK_OPS is set, all the normal writeback (before the SBI_BLOCK_OPS is clear) of dentry pages which do not come from write_checkpoint flow will totally miss all the f2fs_balance_fs check. On 2017/8/1 8:44, Jaegeuk Kim wrote:

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-08-01 Thread Yunlong Song
Hi Jay, The SBI_BLOCK_OPS can not cover all the case, once SBI_BLOCK_OPS is set, all the normal writeback (before the SBI_BLOCK_OPS is clear) of dentry pages which do not come from write_checkpoint flow will totally miss all the f2fs_balance_fs check. On 2017/8/1 8:44, Jaegeuk Kim wrote:

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-31 Thread Jaegeuk Kim
Hi Yunlong, On 07/29, Yunlong Song wrote: > f2fs_balance_fs of dentry pages is skipped in __write_data_page due to > deadlock > of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for > normal dentry page writeback to ensure there are always enough free segments. So, how

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-31 Thread Jaegeuk Kim
Hi Yunlong, On 07/29, Yunlong Song wrote: > f2fs_balance_fs of dentry pages is skipped in __write_data_page due to > deadlock > of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for > normal dentry page writeback to ensure there are always enough free segments. So, how

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread Chao Yu
Hi Jaegeuk, On 2017/7/30 15:31, Jaegeuk Kim wrote: > On 07/29, Yunlong Song wrote: >> f2fs_balance_fs of dentry pages is skipped in __write_data_page due to >> deadlock >> of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for >> normal dentry page writeback to ensure there

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread Chao Yu
Hi Jaegeuk, On 2017/7/30 15:31, Jaegeuk Kim wrote: > On 07/29, Yunlong Song wrote: >> f2fs_balance_fs of dentry pages is skipped in __write_data_page due to >> deadlock >> of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for >> normal dentry page writeback to ensure there

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread Jaegeuk Kim
On 07/29, Yunlong Song wrote: > f2fs_balance_fs of dentry pages is skipped in __write_data_page due to > deadlock > of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for > normal dentry page writeback to ensure there are always enough free segments. Sorry, by the way, why

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread Jaegeuk Kim
On 07/29, Yunlong Song wrote: > f2fs_balance_fs of dentry pages is skipped in __write_data_page due to > deadlock > of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for > normal dentry page writeback to ensure there are always enough free segments. Sorry, by the way, why

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread kbuild test robot
Hi Yunlong, [auto build test ERROR on f2fs/dev-test] [also build test ERROR on v4.13-rc2 next-20170728] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-30 Thread kbuild test robot
Hi Yunlong, [auto build test ERROR on f2fs/dev-test] [also build test ERROR on v4.13-rc2 next-20170728] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-29 Thread Yunlong Song
f2fs_balance_fs of dentry pages is skipped in __write_data_page due to deadlock of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for normal dentry page writeback to ensure there are always enough free segments. Reported-by: Chao Yu Signed-off-by:

[PATCH] f2fs: provide f2fs_balance_fs to __write_data_page for dentry pages

2017-07-29 Thread Yunlong Song
f2fs_balance_fs of dentry pages is skipped in __write_data_page due to deadlock of gc_mutex in write_checkpoint flow. This patch enables f2fs_balance_fs for normal dentry page writeback to ensure there are always enough free segments. Reported-by: Chao Yu Signed-off-by: Yunlong Song ---