Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478304
| From | Chao Yu <chao@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation |
| Date | 2016-09-07 15:40 +0200 |
| Message-ID | <seLf3-jD-9@gated-at.bofh.it> (permalink) |
| References | <scHph-70l-67@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Jaegeuk,
On 2016/9/2 4:46, Jaegeuk Kim wrote:
> Fix wrong condition check for defragmentation of a file.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> index 37c24be..a8aa6fd 100644
> --- a/fs/f2fs/file.c
> +++ b/fs/f2fs/file.c
> @@ -2037,7 +2037,7 @@ static int f2fs_defragment_range(struct f2fs_sb_info *sbi,
> * avoid defragment running in SSR mode when free section are allocated
> * intensively
> */
> - if (has_not_enough_free_secs(sbi, sec_num)) {
> + if (free_sections(sbi) <= sec_num) {
Why don't we check dirty dentry/node/imeta blocks here? they will be generated
at any time after f2fs_balance_fs. So, isn't original condition more strict than
new one?
Thanks,
> err = -EAGAIN;
> goto out;
> }
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] f2fs: check free_sections for defragmentation Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-01 23:10 +0200
Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation Chao Yu <chao@kernel.org> - 2016-09-07 15:40 +0200
Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-08 02:20 +0200
Re: [f2fs-dev] [PATCH] f2fs: check free_sections for defragmentation Chao Yu <chao@kernel.org> - 2016-09-08 18:10 +0200
csiph-web