[f2fs-dev] [PATCH 2/2 v4] f2fs: add sysfs nodes to set last_age_weight

2023-02-04 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- change log v3 -> v4: - allow 0 and 100 to a valid value Documentation/ABI/testing/sysfs-fs-f2fs | 5 + fs/f2fs/extent_cache.c | 15 +-- fs/f2fs/f2fs.h | 1 + fs/f2fs/sysf

[f2fs-dev] [PATCH 1/2 v3] f2fs: fix wrong calculation of block age

2023-02-02 Thread qixiaoyu1
Currently we wrongly calculate the new block age to old * LAST_AGE_WEIGHT / 100. Fix it to new * (100 - LAST_AGE_WEIGHT) / 100 + old * LAST_AGE_WEIGHT / 100. Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Change log v1 -> v2: - fix udiv Change log v2 -> v3:

[f2fs-dev] [PATCH 2/2 v3] f2fs: add sysfs nodes to set last_age_weight

2023-02-02 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Documentation/ABI/testing/sysfs-fs-f2fs | 5 + fs/f2fs/extent_cache.c | 15 +-- fs/f2fs/f2fs.h | 1 + fs/f2fs/sysfs.c | 11 +++ 4 files changed, 26

[f2fs-dev] [PATCH 2/2 v2] f2fs: add sysfs nodes to set last_age_weight

2023-01-15 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Documentation/ABI/testing/sysfs-fs-f2fs | 5 + fs/f2fs/extent_cache.c | 12 +++- fs/f2fs/f2fs.h | 1 + fs/f2fs/sysfs.c | 11 +++ 4 files changed, 24

[f2fs-dev] [PATCH 1/2 v2] f2fs: fix wrong calculation of block age

2023-01-15 Thread qixiaoyu1
Currently we wrongly calculate the new block age to old * LAST_AGE_WEIGHT / 100. Fix it to new * (100 - LAST_AGE_WEIGHT) / 100 + old * LAST_AGE_WEIGHT / 100. Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Change log v1 -> v2: - fix udiv fs/f2fs/extent_cache.c

[f2fs-dev] [PATCH 2/2] f2fs: add sysfs nodes to set last_age_weight

2023-01-13 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 --- Documentation/ABI/testing/sysfs-fs-f2fs | 5 + fs/f2fs/extent_cache.c | 11 +++ fs/f2fs/f2fs.h | 1 + fs/f2fs/sysfs.c | 11 +++ 4 files changed, 24 insertions(+), 4 deletions

[f2fs-dev] [PATCH 1/2] f2fs: fix wrong calculation of block age

2023-01-13 Thread qixiaoyu1
Currently we wrongly calculate the new block age to old * LAST_AGE_WEIGHT / 100. Fix it to new * (100 - LAST_AGE_WEIGHT) / 100 + old * LAST_AGE_WEIGHT / 100. Signed-off-by: qixiaoyu1 --- fs/f2fs/extent_cache.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[f2fs-dev] [PATCH 5/5] f2fs: implement data block seperation with block update frequency

2022-11-28 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- Documentation/ABI/testing/sysfs-fs-f2fs | 14 fs/f2fs/block_age.c | 29 + fs/f2fs/f2fs.h | 4 fs/f2fs/segment.c | 9 fs

[f2fs-dev] [PATCH 2/5] f2fs: implement cache to manager block update frequency per inode

2022-11-28 Thread qixiaoyu1
From: xiongping1 Signed-off-by: xiongping1 Signed-off-by: qixiaoyu1 --- fs/f2fs/block_age.c | 590 +++- fs/f2fs/debug.c | 13 + fs/f2fs/f2fs.h | 64 +++- fs/f2fs/file.c | 10 + fs/f2fs/inode.c | 8

[f2fs-dev] [PATCH 4/5] f2fs: update block age info during out of place update

2022-11-28 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 Signed-off-by: xiongping1 --- fs/f2fs/block_age.c | 89 - fs/f2fs/f2fs.h | 1 + fs/f2fs/segment.c | 4 ++ 3 files changed, 92 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/block_age.c b/fs/f2fs/block_age.c index

[f2fs-dev] [PATCH 3/5] f2fs: add age_extent_cache mount option

2022-11-28 Thread qixiaoyu1
From: xiongping1 enable data block seperation feature only when age_extent_cache mount option is on Signed-off-by: xiongping1 Signed-off-by: qixiaoyu1 --- Documentation/filesystems/f2fs.rst | 4 fs/f2fs/block_age.c| 3 +++ fs/f2fs/f2fs.h | 1 + fs

[f2fs-dev] [PATCH 0/5] Support enhanced hot/cold data separation for f2fs

2022-11-28 Thread qixiaoyu1
ed for .db files, and buffered write will be used for other files The storage of test device is large enough(128G) so that it will not switch to SSR mode during the test. Benefit: dirty segment count increment reduce about 14% - before: Dirty +21110 - after: Dirty +18286 qixiaoyu1 (2): f2fs: up

[f2fs-dev] [PATCH 1/5] f2fs: record total data blocks allocated since mount

2022-11-28 Thread qixiaoyu1
From: xiongping1 Signed-off-by: xiongping1 Signed-off-by: qixiaoyu1 --- fs/f2fs/Kconfig | 7 +++ fs/f2fs/Makefile| 1 + fs/f2fs/block_age.c | 28 fs/f2fs/debug.c | 7 +++ fs/f2fs/f2fs.h | 15 +++ fs/f2fs/segment.c | 4

[f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-10-20 Thread qixiaoyu1
Currently IPU policy for fdatasync is coupled with F2FS_IPU_FSYNC. Fix to apply it to all IPU policy. Signed-off-by: qixiaoyu1 --- fs/f2fs/data.c | 8 +++- fs/f2fs/file.c | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index

[f2fs-dev] [PATCH v2] f2fs: don't bother wait_ms by foreground gc

2022-07-21 Thread qixiaoyu1
f2fs_gc returns -EINVAL via f2fs_balance_fs when there is enough free secs after write checkpoint, but with gc_merge enabled, it will cause the sleep time of gc thread to be set to no_gc_sleep_time even if there are many dirty segments can be selected. Signed-off-by: qixiaoyu1 --- fs/f2fs/gc.c

[f2fs-dev] [PATCH] f2fs: don't bother wait_ms by foreground gc

2022-07-17 Thread qixiaoyu1
f2fs_gc returns -EINVAL via f2fs_balance_fs when there is enough free secs after write checkpoint, but with gc_merge enabled, it will cause the sleep time of gc thread to be set to no_gc_sleep_time even if there are many dirty segments can be selected. Signed-off-by: qixiaoyu1 --- fs/f2fs/gc.c

[f2fs-dev] [PATCH v3 2/2] resize.f2fs: update man page for options -i, -s and -V

2022-06-20 Thread qixiaoyu1
Signed-off-by: qixiaoyu1 --- man/resize.f2fs.8 | 18 ++ 1 file changed, 18 insertions(+) diff --git a/man/resize.f2fs.8 b/man/resize.f2fs.8 index a4b6cd7..3288760 100644 --- a/man/resize.f2fs.8 +++ b/man/resize.f2fs.8 @@ -17,6 +17,15 @@ resize.f2fs \- resize filesystem size .B

[f2fs-dev] [PATCH v3 1/2] resize.f2fs: add option to manually specify new overprovision

2022-06-20 Thread qixiaoyu1
-by: liuchao12 Signed-off-by: qixiaoyu1 --- Change log from v2: - Sorry for miss liuchao12 mistakenly when merge the two patches... Change log from v1: - merged fix to check free space before grow - delete unessassary check of "c.new_overprovision == 0" - update man p

Re: [f2fs-dev] [PATCH v2] resize.f2fs: add option to manually specify new overprovision

2022-06-20 Thread qixiaoyu1
-by: qixiaoyu1 --- Change log form v1: - merged fix to check free space before grow - delete unessassary check of "c.new_overprovision == 0" - update man page fsck/main.c | 8 ++-- fsck/resize.c | 45 - man/resize.f

[f2fs-dev] [PATCH 1/2] resize.f2fs: add option to manually specify new overprovision

2022-06-14 Thread qixiaoyu1
From: liuchao12 Make.f2fs supports manually specifying overprovision, and we expect resize.f2fs to support it as well. This change add a new '-o' option to manually specify overprovision. Signed-off-by: liuchao12 --- fsck/main.c | 8 ++-- fsck/resize.c | 12 ++-- 2 files

[f2fs-dev] [PATCH 2/2] f2fs-tools: fix to check free space before grow

2022-06-14 Thread qixiaoyu1
mount(2) system call failed: Structure needs cleaning. Signed-off-by: qixiaoyu1 --- fsck/resize.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/fsck/resize.c b/fsck/resize.c index d19c6fa..e135b66 100644 --- a/fsck/resize.c +++ b/fsck