mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
9401f8f0eb
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, and fix to check free space before grow. Otherwise, after grow, kernel may report below error message when we mount the image if -o parameter is specified during resize: F2FS-fs (loop0): invalid crc_offset: 0 F2FS-fs (loop0): Wrong valid_user_blocks: 16404, user_block_count: 13312 F2FS-fs (loop0): Failed to get valid F2FS checkpoint mount(2) system call failed: Structure needs cleaning. Signed-off-by: liuchao12 <liuchao12@xiaomi.com> Signed-off-by: qixiaoyu1 <qixiaoyu1@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Change-Id: I2ad0ecc5546a1712b7aa36230e91c3e0b1beb7e0
78 lines
1.5 KiB
Groff
78 lines
1.5 KiB
Groff
.\" Copyright (c) 2015 Jaegeuk Kim <jaegeuk@kernel.org>
|
|
.\"
|
|
.TH RESIZE.F2FS 8
|
|
.SH NAME
|
|
resize.f2fs \- resize filesystem size
|
|
.SH SYNOPSIS
|
|
.B resize.f2fs
|
|
[
|
|
.B \-t
|
|
.I target sectors
|
|
]
|
|
[
|
|
.B \-d
|
|
.I debugging-level
|
|
]
|
|
[
|
|
.B \-o
|
|
.I overprovision-ratio-percentage
|
|
]
|
|
[
|
|
.B \-i
|
|
]
|
|
[
|
|
.B \-s
|
|
]
|
|
[
|
|
.B \-V
|
|
]
|
|
.I device
|
|
.SH DESCRIPTION
|
|
.B resize.f2fs
|
|
is used to resize an f2fs file system (usually in a disk partition).
|
|
\fIdevice\fP is the special file corresponding to the device (e.g.
|
|
\fI/dev/sdXX\fP).
|
|
|
|
Current version only supports expanding the prebuilt filesystem.
|
|
|
|
.PP
|
|
The exit code returned by
|
|
.B resize.f2fs
|
|
is 0 on success and -1 on failure.
|
|
.SH OPTIONS
|
|
.TP
|
|
.BI \-t " target sectors"
|
|
Specify the size in sectors.
|
|
.TP
|
|
.BI \-d " debug-level"
|
|
Specify the level of debugging options.
|
|
The default number is 0, which shows basic debugging messages.
|
|
.TP
|
|
.BI \-o " overprovision-ratio-percentage"
|
|
Specify the percentage of the volume that will be used as overprovision area.
|
|
This area is hidden to users, and utilized by F2FS cleaner. If not specified, the
|
|
best number will be assigned automatically according to the partition size.
|
|
.TP
|
|
.BI \-i
|
|
Enable extended node bitmap.
|
|
.TP
|
|
.BI \-s
|
|
Enable safe resize.
|
|
.TP
|
|
.BI \-V
|
|
Print the version number and exit.
|
|
.TP
|
|
.SH AUTHOR
|
|
This version of
|
|
.B resize.f2fs
|
|
has been written by Jaegeuk Kim <jaegeuk@kernel.org>.
|
|
.SH AVAILABILITY
|
|
.B resize.f2fs
|
|
is available from git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git.
|
|
.SH SEE ALSO
|
|
.BR mkfs.f2fs(8),
|
|
.BR fsck.f2fs(8),
|
|
.BR dump.f2fs(8),
|
|
.BR defrag.f2fs(8),
|
|
.BR sload.f2fs(8).
|