On 2021/2/25 17:18, Arnaud Ferraris wrote:
Hi,
Le 25/02/2021 à 02:50, Chao Yu a écrit :
On 2021/2/25 1:03, Arnaud Ferraris wrote:
f8410857b7a81b1b347253fcca713d8b105e9e7b changed the way reserved
Commit f8410857b7a8 ("f2fs-tools: zns zone-capacity support") changed ...
Will do.
However, I didn't test that patch enough as it can corrupt large
Oops, I've no idea why this can happen after reviewing these codes..
Let me know you have any progress.
Thanks
filesystems, I'll dig a bit deeper and post a v2 asap.
Thanks,
Arnaud
Otherwise, it looks good to me.
Reviewed-by: Chao Yu <[email protected]>
Thanks,
segments count was calculated in `mkfs`, but that wasn't reported back
to `resize`, making it impossible to resize a filesystem in some cases.
Signed-off-by: Arnaud Ferraris <[email protected]>
---
fsck/resize.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fsck/resize.c b/fsck/resize.c
index 46b1cfb..3ee05f7 100644
--- a/fsck/resize.c
+++ b/fsck/resize.c
@@ -148,8 +148,8 @@ safe_resize:
/* Let's determine the best reserved and overprovisioned space */
c.new_overprovision = get_best_overprovision(sb);
c.new_reserved_segments =
- (2 * (100 / c.new_overprovision + 1) + 6) *
- get_sb(segs_per_sec);
+ (2 * (100 / c.new_overprovision + 1) + NR_CURSEG_TYPE) *
+ round_up(f2fs_get_usable_segments(sb),
get_sb(section_count));
if ((get_sb(segment_count_main) - 2) < c.new_reserved_segments ||
get_sb(segment_count_main) * blks_per_seg >
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel