mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2025-02-17 01:19:53 +00:00
![Antoine Viallon](/assets/img/avatar_default.png)
commit 028af9f6067c1345023af9cd8ecbb76a770241ae category: bugfix issue: #I6VAS0 CVE: NA Signed-off-by: DongSenhao <dongsenhao2@huawei.com> --------------------------------------- On large SSDs filled with lots of data, fsck.f2fs can be very long to finish. For instance, on my 1TB SSD filled at 99%, it takes literally 5 minutes to complete. Currently, the only way to have some feedback is to enable debug output, but it is very verbose and doesn't tell the actual progress. This patch implements a simple progress report in the longest running part of the check (in fsck_chk_node_blk). The number of checked node / total valid nodes is printed every 1000 nodes checked, and the percentage of progress is also calculated and printed. Signed-off-by: Antoine Viallon <antoine@lesviallon.fr> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
F2FS format utility
To use the f2fs filesystem, you should format the storage partition with this utility. Otherwise, you cannot mount f2fs.
Before compilation
You should install the following packages.
- libuuid-devel or uuid-dev
- pkg-config
- autoconf
- libtool
- libselinux1-dev
Initial compilation
Before initial compilation, autoconf/automake tools should be run.
./autogen.sh
How to compile
./configure
make
make install
How to cross-compile (e.g., for ARM)
-
Add the below line into mkfs/Makefile.am:
mkfs_f2fs_LDFLAGS = -all-static -
Add the below line into fsck/Makefile.am:
fsck_f2fs_LDFLAGS = -all-static -
then, do:
LDFLAGS=--static ./configure
--host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi
make
How to run by default
mkfs.f2fs -l [LABEL] $DEV
For more mkfs options, see the man page.
Description
Languages
C
98.1%
Shell
0.7%
M4
0.6%
Makefile
0.3%
Roff
0.3%