[f2fs-dev] [RFC PATCH v2] fsck.f2fs: write checkpoint out of place first

2018-07-26 Thread Weichao Guo
We may encounter both checkpoints invalid in such a case: 1. write checkpoint A, B, C; 2. sudden power-cut during write checkpoint D; 3. fsck changes the total block count of checkpoint C; 4. sudden power-cut during fsck write checkpoint C in place - - | ver C |

Re: [f2fs-dev] [PATCH RFC] fsck.f2fs: write checkpoint out of place first

2018-07-26 Thread guoweichao
On 2018/7/26 19:52, Chao Yu wrote: > On 2018/7/24 23:28, Weichao Guo wrote: >> We may encounter both checkpoints invalid in such a case: >> 1. write checkpoint A, B, C; >> 2. sudden power-cut during write checkpoint D; >> 3. fsck changes the total block count of checkpoint C; >> 4. sudden

[f2fs-dev] [RFC PATCH v2] fsck.f2fs: rebuild qf_ino if quota node is unreachable

2018-07-26 Thread Sheng Yong
If a quota node is corrupted, it may be unreachable. But its qf_ino in super blocks is not cleared. To keep quota feature available, let's try to rebuild a new quota node. Disk quota entries are written back according to data recorded in the dict. quota_write_inode() will help to rebuild all

Re: [f2fs-dev] [PATCH RFC] fsck.f2fs: write checkpoint out of place first

2018-07-26 Thread Chao Yu
On 2018/7/24 23:28, Weichao Guo wrote: > We may encounter both checkpoints invalid in such a case: > 1. write checkpoint A, B, C; > 2. sudden power-cut during write checkpoint D; > 3. fsck changes the total block count of checkpoint C; > 4. sudden power-cut during fsck write checkpoint C in place

Re: [f2fs-dev] [PATCH] f2fs: quota: remove journalled project quota

2018-07-26 Thread Sheng Yong
Hi, Chao On 2018/7/26 19:38, Chao Yu wrote: On 2018/7/26 19:25, Sheng Yong wrote: Quota sysfiles are already using journalled method to save quota value. And non-journalled project quota is not supported by userspace tools. So there is no need to implement journalled project quota. Well,

Re: [f2fs-dev] [PATCH] f2fs: quota: remove journalled project quota

2018-07-26 Thread Chao Yu
On 2018/7/26 19:25, Sheng Yong wrote: > Quota sysfiles are already using journalled method to save quota value. > And non-journalled project quota is not supported by userspace tools. So > there is no need to implement journalled project quota. Well, when quota_ino is not supported yet, I wrote

Re: [f2fs-dev] [PATCH v2] f2fs: quota: fix incorrect comments

2018-07-26 Thread Chao Yu
On 2018/7/26 19:24, Sheng Yong wrote: > Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Thanks, -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!

[f2fs-dev] [PATCH] f2fs: quota: remove journalled project quota

2018-07-26 Thread Sheng Yong
Quota sysfiles are already using journalled method to save quota value. And non-journalled project quota is not supported by userspace tools. So there is no need to implement journalled project quota. Signed-off-by: Sheng Yong --- Documentation/filesystems/f2fs.txt | 2 -- fs/f2fs/super.c

[f2fs-dev] [PATCH v2] f2fs: quota: fix incorrect comments

2018-07-26 Thread Sheng Yong
Signed-off-by: Sheng Yong --- fs/f2fs/checkpoint.c | 5 - fs/f2fs/super.c | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 04841f32d4d9..581710760ba6 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c

[f2fs-dev] [PATCH] f2fs: relocate f2fs_sanity_check_ckpt() and make it static

2018-07-26 Thread Chao Yu
Signed-off-by: Chao Yu --- fs/f2fs/checkpoint.c | 93 +++- fs/f2fs/f2fs.h | 1 - fs/f2fs/super.c | 91 --- 3 files changed, 92 insertions(+), 93 deletions(-) diff --git a/fs/f2fs/checkpoint.c

[f2fs-dev] [PATCH] f2fs: avoid race between zero_range and background GC

2018-07-26 Thread Chao Yu
Thread ABackground GC - f2fs_zero_range - truncate_pagecache_range - gc_data_segment - get_read_data_page - move_data_page