Commit Graph

945 Commits

Author SHA1 Message Date
fangzhou
684c77989b Use pread64/pwrite64 syscall optimize fsck performance
Issue: https://gitee.com/openharmony/third_party_f2fs-tools/issues/I9CA01

Signed-off-by: Lu Fangzhou <lufangzhou1@huawei.com>
2024-03-28 12:21:42 +08:00
openharmony_ci
be08214cd8
!39 fix: f2fs_do_mount维测增强
Merge pull request !39 from nieben/f2fs_do_mount-dfx
2024-03-21 07:28:59 +00:00
nieben
f505165a60 f2fs_do_mount-dfx
Signed-off-by: nieben <nieben1@huawei.com>
2024-03-21 10:39:24 +08:00
openharmony_ci
e3bf3a6c13
!38 第三方f2fs-tools部件编译整改
Merge pull request !38 from tongkai0808fh/master
2024-03-19 08:51:09 +00:00
tongkai0808fh
7a530965a2
修改inner_kits配置
Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
2024-03-19 06:34:01 +00:00
openharmony_ci
22d5d3737b
!35 第三方f2fs-tools部件独立编译整改
Merge pull request !35 from tongkai0808fh/master
2024-02-29 11:37:25 +00:00
tongkai0808fh
c3bc6b2b82
修改bundle.json的子部件配置信息
Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
2024-02-29 09:05:19 +00:00
openharmony_ci
188ac39e7f
!34 第三方f2fs部件bundle.json文件更新
Merge pull request !34 from tongkai0808fh/master
2024-02-29 06:40:30 +00:00
tongkai0808fh
f0c868daca
bundle.json文件加入mkfs.f2fs子组件
Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
2024-02-29 03:19:08 +00:00
openharmony_ci
90d4a99e83
!32 第三方分f2fs-tools部件独立编译整改
Merge pull request !32 from tongkai0808fh/master
2024-02-21 03:52:17 +00:00
tongkai0808fh
ef6ee84a1c
第三方f2fs-tools部件独立编译整改
Signed-off-by: tongkai0808fh <tongkai5@huawei.com>
2024-02-21 02:51:31 +00:00
openharmony_ci
40c355d810
!31 增加开源声明文件
Merge pull request !31 from wangmingxuan/master
2024-01-25 03:09:17 +00:00
psycho
07937972a5 增加开源声明文件
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-25 10:30:22 +08:00
openharmony_ci
d4b6da9d85
!30 f2fs-tools开源信息与手机体现不一致
Merge pull request !30 from wangmingxuan/master
2024-01-22 11:12:51 +00:00
psycho
32b532225f 开源文件更新
Signed-off-by: psycho <wangmingxuan6@h-partners.com>
2024-01-22 14:12:59 +08:00
openharmony_ci
fcc0fd642f
!27 resize.f2fs支持传参使能projquota/casefold特性
Merge pull request !27 from 范威威/master
2023-09-05 04:52:12 +00:00
18682127009
852cbb805e Fix: resize.f2fs enable projquota/casefold
Signed-off-by: 18682127009 <fanww92@126.com>
2023-09-04 19:34:25 +08:00
openharmony_ci
f19090cb94
!24 f2fs-tools构建规范化整改
Merge pull request !24 from yangjingbo/f2fs-tools_rectify_0614
2023-06-25 08:36:01 +00:00
y30045862
2ba6b2b207 f2fs-tools构建规范化整改
Signed-off-by: yangjingbo10 <yangjingbo10@huawei.com>

Change-Id: I1aae1cb27162594dae1e395f46fcf0833750e6d0
2023-06-21 09:25:04 +08:00
openharmony_ci
b809e65933
!23 fix e2fsprogs compile in f2fs_tools
Merge pull request !23 from 张文迪/master
2023-06-05 01:44:05 +00:00
张文迪
9fef819eb4 fix e2fsprogs
Signed-off-by: 张文迪 <zhangwendi3@huawei.com>
2023-06-03 17:03:53 +08:00
openharmony_ci
9cf86194f2
!22 fix compile in f2fstools
Merge pull request !22 from 张文迪/master
2023-06-02 01:37:43 +00:00
张文迪
b08c917ed4 fix compile
Signed-off-by: 张文迪 <zhangwendi3@huawei.com>
2023-06-01 20:39:25 +08:00
openharmony_ci
349fedd3f1
!21 adapt the modification of e2fsprog switching to OpenEuler
Merge pull request !21 from 张文迪/master
2023-05-24 02:13:19 +00:00
张文迪
461b8536e1 adapt the modification of e2fsprog switching to OpenEuler
Signed-off-by: 张文迪 <zhangwendi3@huawei.com>
2023-05-20 16:59:34 +08:00
openharmony_ci
fb61e5453d
!20 tools升级v1.14==>v1.15
Merge pull request !20 from 董森浩/master
2023-05-11 08:45:46 +00:00
dongsenhao
61cee5700e 适配build.gn
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-14 16:51:10 +08:00
Jaegeuk Kim
74d4671ba2 f2fs-tools: upgrade version 1.15.0
commit 64f2596142800c215cb40a658ebd5793ed37c936
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:52 +08:00
Jaegeuk Kim
3eb1991f44 f2fs-tools: build silently
commit d9d5b11413bd40dbd31a2c64750565d508a180b3
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:52 +08:00
Jaegeuk Kim
1959950d86 fsck.f2fs: fix broken file_map output
commit 299c0b566ad71f0a9ca0cc359d1d174de9068294
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

The new fsck progress should not be used for file_map.

Reported-by: Michael Benedict <michaelbenedicttjahya@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:52 +08:00
Jaegeuk Kim
b844b4b34c f2fs-tools: show segment/section layout correctly
commit 3af62be37cd2407da1f44396cd9390bd560ed01f
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

This patch fixes wrong segment/section print-outs.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:52 +08:00
Jaegeuk Kim
43aa4d3b7b f2fs-tools: use android config only if there's no config.h
commit 4d9c009c343ce1247d9df583b22110f348201b3d
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Chao Yu
5ddd2c6685 dump.f2fs: compress: fix dstlen of LZ4_compress_fast_extState()
commit 0b9b89fda2e9fbaf17a11fa15332e7ae95cf5261
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Compressed cluster content includes compress cluster header, so
calculation of dstlen parameter in LZ4_compress_fast_extState()
should consider this design, otherwise compressed data may overflow
destination buffer during compression.

Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Jaegeuk Kim
fbbd3511f3 mkfs.f2fs: check uuid library
commit eee3969d7dcf3be9c3b831d993fcf49f55855a35
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Jaegeuk Kim
38f1e4903f f2fs-tools: use fsync() in Android
commit e5fe1a213698c6765ecf9aabddf1e461b50b9203
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Jaegeuk Kim
89c91958fa f2fs-tools: support zoned device in Android
commit ea9921f4f5b947084a70a94573c472bd953e1c0d
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

This requires to change Android.bp in AOSP.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I28a4a701513cb2420cdf0e0e2aa3f60e712f2fcb
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Jaegeuk Kim
fefda1af29 android_config.h: add missing liblz4
commit a8fefc20bd4c030069f1d9e527ee04a0bb20e419
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Jaegeuk Kim
70c040387e libf2fs_io: add unused mactor to avoid build failure
commit 0c54cf767f5a10c8293358a991ba432d8ff0476d
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Bart Van Assche
6303983f84 ci: Enable -Wall, -Wextra and -Werror
commit 6eebd13e76e12748cda19daa340e3953ea1e8ecb
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Make the Github continuous integration checks more strict.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:51 +08:00
Bart Van Assche
25d83da964 Fix PowerPC format string warnings
commit c491657c0eb68d01dee5cc66ee3909dba5523540
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

__SANE_USERSPACE_TYPES__ must be defined before <linux/types.h> is
included. Hence this patch that moves the definition of that macro into
the source files that need it.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
5c5c31ca6b Suppress a compiler warning about integer truncation
commit 70e4139665cbcb7bde42cf004267dd97268f61b7
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

This patch prevents that older compilers report the following warning:

f2fs_format.c: In function ‘f2fs_prepare_super_block’:
../include/f2fs_fs.h:350:26: error: conversion from ‘unsigned int’ to ‘__uint16_t’ {aka ‘short unsigned int’} changes value from ‘4076150800’ to ‘8208’ [-Werror=overflow]
  350 | #define F2FS_SUPER_MAGIC 0xF2F52010 /* F2FS Magic Number */
      |                          ^~~~~~~~~~
 ../include/f2fs_fs.h:574:49: note: in expansion of macro ‘cpu_to_le16’
  574 | #define set_sb_le16(member, val)  (sb->member = cpu_to_le16(val))
      |                                                 ^~~~~~~~~~~

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
094b306b3b Annotate switch/case fallthrough
commit 7a1206adf33595a50b669d4027b72ad0786fb12f
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Just like in the Linux kernel source code, annotate switch/case
fallthrough.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
5a3dc5cd85 Change #ifdef _WIN32 checks into #ifdef HAVE_.*
commit b964b79d495d058f645f5a63357699a6c295025e
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

It is recommended to test a HAVE_* macro instead of directly testing the
host type in source code. Hence this patch.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
1fa72eed97 tools/f2fs_io: Fix the type of 'ret'
commit 28de4d1334d4519c1a64659245dfd84cc2ddfa6c
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Make it possible to check whether the return value of ioctl() is negative.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
ff7c97ddbc fsck/segment.c: Remove dead code
commit fdff1ab3157c2787d908e013b9d42db84184e196
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Since 'remained_blkentries' is unsigned, the assert statement that
verifies whether that variable is positive will never fail. Hence
remove that assert statement.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
7ab17e3382 fsck/main.c: Suppress a compiler warning
commit ede3bde6ea6ad84dd189ca0a4198a5cb5f35bdb1
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Suppress the following compiler warning:

main.c:37:14: warning: unused function 'absolute_path' [-Wunused-function]
static char *absolute_path(const char *file)
             ^

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
989594261b tools/f2fscrypt.c: Fix build without uuid/uuid.h header file
commit 93c6483b85141551e6a5fea339ab4c6cc1f9cc8c
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:50 +08:00
Bart Van Assche
0026d6bb58 fsck: Remove a superfluous include directive
commit 559e60ef1bdcac2084052acd0c1682653c6540d3
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:49 +08:00
Bart Van Assche
eeba3ae145 mkfs/f2fs_format.c: Suppress a compiler warning
commit 98f7f56cf35c352c1ff3d83ad1e72e5b1e5fdf84
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

Suppress the following compiler warning:

f2fs_format.c:1653:37: warning: adding 'int' to a string does not append to the
      string [-Wstring-plus-int]
                memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN,
                                              ~~~~^~~~~~~~~~~~~~~
f2fs_format.c:1653:37: note: use array indexing to silence this warning
                memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN,
                                                  ^
                                              &   [              ]

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:49 +08:00
Bart Van Assche
20a09c8920 configure.ac: Detect selinux/android.h
commit ef011a49f3c640c59c7e21c3816d01c039711c58
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

The selinux/android.h header file is available in Android but not in the
Android NDK. Hence this patch that detects presence of that header file
at configure time.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:49 +08:00