Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-05 Thread Yunlong Song
So there is no connection between sbi->user_block_count - valid_user_blocks(sbi) and fi->inmem_blocks. It is sensible that sbi->user_block_count - valid_user_blocks(sbi) is smaller than fi->inmem_blocks. On 2017/11/3 23:23, Chao Yu wrote: On 2017/11/3 22:40, Yunlong Song wrote: Test: Newest k

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-03 Thread Chao Yu
On 2017/11/3 22:40, Yunlong Song wrote: > Test: > Newest kernel source code from f2fs-dev > 1G zram with f2fs > 8 threads to atomic write one same file on zram > there are four kinds of atomic write at the same time: > 1 no atomic start, with atomic commit > 2 no atomic start, no atomic commit > 3

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-03 Thread Yunlong Song
Test: Newest kernel source code from f2fs-dev 1G zram with f2fs 8 threads to atomic write one same file on zram there are four kinds of atomic write at the same time: 1 no atomic start, with atomic commit 2 no atomic start, no atomic commit 3 atomic start, with atomic commit 4 atomic start, no ato

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Jaegeuk Kim
On 10/30, Yunlong Song wrote: > f2fs_balance_fs only actives once in the commit_inmem_pages, but there > are more than one page to commit, so all the other pages will miss the > check. This will lead to out-of-free problem when commit a very large > file. However, we cannot do f2fs_balance_fs for e

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Yunlong Song
Because I found that it will still lead to out-of-free problem with out that check. I trace and find that it is possible that the committing date pages of the atomic file is bigger than the sbi->user_block_count - valid_user_blocks(sbi), so I add this check. On 2017/11/3 11:46, Jaegeuk Kim wro

Re: [f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-11-02 Thread Yunlong Song
ping... On 2017/10/30 21:04, Yunlong Song wrote: f2fs_balance_fs only actives once in the commit_inmem_pages, but there are more than one page to commit, so all the other pages will miss the check. This will lead to out-of-free problem when commit a very large file. However, we cannot do f2fs_ba

[f2fs-dev] [PATCH v2] f2fs: fix out-of-free problem caused by atomic write

2017-10-30 Thread Yunlong Song
f2fs_balance_fs only actives once in the commit_inmem_pages, but there are more than one page to commit, so all the other pages will miss the check. This will lead to out-of-free problem when commit a very large file. However, we cannot do f2fs_balance_fs for each inmem page, since this will break