| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cherry-picked from:
git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
This release includes:
- add sg_write_buffer for UFS firmware update in Android
- wanted_sector_size to specify sector size explicity
- support fsverity feature bit
- support lost+found feature
And, it includes some critical bug fixes.
b98fab3 f2fs-tools: release 1.11.0
1c15c8d resize.f2fs: fix wrong nat_bits migration
154bf70 fsck.f2fs: add sanity check nat_bits
41149fb fsck.f2fs: simplify fsck_chk_quota_node in PREEN_MODE_1
eb61637 fsck.f2fs: reconnect unreachable files to lost+found
ff37829 mkfs.f2fs: create lost+found directory
1325c93 dump.f2fs: fix a wrong report for dump an {d,id,did}node
7b73b6e mkfs.f2fs: treat db's data as hot one
6fdc37f mkfs.f2fs: support hot file extension
4d4a9f2 fibmap: include f2fs_fs.h before other header files
c265813 fsck.f2fs: read nat block if nat entry is invalid
fbcc3b1 fsck.f2fs: integrate sanity_check_inode to __check_inode_mode
5e91b36 mkfs.f2fs: introduce mkfs parameters in f2fs_configuration
be4f9a6 fsck.f2fs: fix typo
822e1a1 f2fs-tools: init f2fs_configuration as 0
3e8c8d7 dump.f2fs: correct the seg type in ssa_dump
f52987e mkfs.f2fs: fix to handle endianness in f2fs_write_check_point_pack
8a96b6a fsck.f2fs: fix to check all the types of current offsets
baaa076 mkfs.f2fs: expand scalability of nat bitmap
06addd3 fsck.f2fs: reduce mem alloc during read sit block
fffc395 fsck.f2fs: read ahead xattr & direct node blocks
10eea8a dump.f2fs: support to dump dirent from blkaddr
c56821f fsck.f2fs: allow -p without value
Change-Id: I6023b5faa3435b7b320b5ad8c531049586981efc
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
This avoids unnecessary sysfs node access causing selinux denial.
Bug: 78358575
Change-Id: I0ab69ac785a92d1deca037c3401c5d6107c500c7
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|\
| |
| |
| | |
Change-Id: I331d71f762c04991629312399d61f78e83442072
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"structure stat" in function stack
Problem:
Function f2fs_dev_is_unmounted() and get_device_info() define local
variable "struct stat xxx". If the callstack is very deep and stack
is smaller, it will result in stack corruption.
Solution:
It is better to use pointer and memory allocation instead of defining
"structure stat" in function stack.
Bug: 69641635
Test: Before GSI includes this patch, following cts-on-gsi test cases
fail. We included this patch and built GSI to run the test by VTS 8.1
R3 and these cases can pass.
android.appsecurity.cts.AdoptableHostTest#testApps
android.appsecurity.cts.AdoptableHostTest#testEjected
android.appsecurity.cts.AdoptableHostTest#testPackageInstaller
android.appsecurity.cts.AdoptableHostTest#testPrimaryStorage
Change-Id: I024ecbf00b618cde68ae2a4dc405f3525ec586c2
Signed-off-by: Iris Chang <iris.chang@mediatek.com>
[Jaegeuk Kim: fix build errors.]
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The wanted_total_sectors was determined by device sector size, but sometimes
we don't know precise sector_size by default. So, let's give wanted_sector_size
in such the ambiguous situation.
Bug: 77306087
Signed-off-by: katao <katao@xiaomi.com>
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit 74bd6a84699fa15662a16c484d70736a7b314107)
Change-Id: I7ea4ace0684cc5360fb0177e44e7a78fd406d68c
|
|\|
| |
| |
| |
| |
| | |
https://android.googlesource.com/platform/external/f2fs-tools into HEAD
Change-Id: I6d7b25d0c4bda6d4735c4f0d9156ebefbfaf35dd
|
| |
| |
| |
| |
| |
| | |
This reverts commit 457c9920f0747f476d88a022203a88a16223088a.
Change-Id: I957729026506899d018eb1fd22e7bc7aa2ed010f
|
|\|
| |
| |
| | |
Change-Id: Ic3afff8a23eb33418925a5f156ca57c0a9ef5411
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(am from https://sourceforge.net/p/linux-f2fs/mailman/message/36277204/)
The args of wanted_total_sectors is calculated based
on the DEFAULT_SECTOR_SIZE(512Bytes).get_device_info(i)
may be reset dev_sector_size, we should reset the number
of wanted_total_sectors.
This bug was reported to Google Issue Tracker.
Link: https://issuetracker.google.com/issues/76407663
Test: userdata use f2fs and enforce encryption.Boot after factory reset.
Change-Id: I8550372f5d8c6ff88f9e242fd591e977107d03ed
Signed-off-by: katao <katao@xiaomi.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
|
|/
|
|
|
|
| |
These clash with libbase
Change-Id: I74162d1fcbdb14dbfdfc8d7252a7d425a146bd4a
|
|
|
|
|
|
|
| |
This patch enables cross compilation for Windows Android SDK
by using ANDROID_WINDOWS_HOST.
Signed-off-by: Hyojun Kim <hyojun@google.com>
|
|
|
|
|
|
|
| |
This adds reading data from sparse_file.
Change-Id: Icd8ec8f401a5ba87d6d9a26dd07062cc003de1e4
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch updates sload.f2fs for android build.
- do fsck() after sload() to update quota information.
- return success, if there's no source directory
-C fs_config
-f source directory [path of the source directory]
-p product out directory
: path on fs_config file for uid/gid/mode
-s file_contexts
: selabel file
-t mount point [prefix of target fs path, default:/]
: path stored in selabel/fs_config files
-T timestamp
Change-Id: Ibb600411dac6081fc63c978cf3086092b89fe9f3
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
| |
tests/generic/405 of fstest suit expects that mkfs will return error
when it hits EIO, so let's propagate error from
f2fs_{finalize,fsync}_device, then mkfs can be aware of fsync error.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: initialize ret to zero]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This patch modifies f2fs-tools to be built in mac.
Change-Id: Ib341e2255b86cb07a7809a83237d9af616fc8777
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
| |
The macros `major' and `minor' have been moved from <sys/types.h>
to <sys/sysmacros.h>. We include the latter to avoid deprecated
messages and future proof the code.
Change-Id: Idec908d8d2e78d50838a63ad54ec8d1b90dd6f82
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
If it detects quota file errors, we can see insane quota limits. In order
to recover that, this patch adds an option to reset them as zeros.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
With --dry-run enabled, fsck.f2fs will do all checks and "fixes" except
that all fixes will not be written to storage at last.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
This patch makes mkfs to support flexible inline xattr feature, also
this enables fsck to recognize new disk-layout of inode which be of
flexible inline xattr size.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use f2fs_finalize_device to fsync previous data in
checkpoint area before write last CP pack, in order to avoid
cp corruption in sudden-power-off case. But this function will
close the device, so this patch introduce a function to call
fsync() only.
Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This release includes:
- sparse support
- inode checksum support
- nat_bits option
- encryption management
- noheap allocation by default
- add CP_TRIMMED_FLAG
f2fs-tools: spread struct f2fs_dentry_ptr for inline path
f2fs-tools: add atomic_write feature flag
f2fs-tools: enhance on-disk inode structure scalability
f2fs-tools: support project quota
f2fs-tools: fix printing block adresses
f2fs-tools: support inode checksum
mkfs.f2fs: fix missing cpu_to_le64 for checkpoint version
fsck.f2fs: write back last cp block in the end
mkfs.f2fs: fix wrong curseg check
f2fs-tools: add cscope files to .gitignore
f2fs-tools: fix is_set_ckpt_flags for correct bool value
f2fs-tools: move_curseg_info only if check_curseg_offset fails
Change-Id: I28f6287977fe9bc1082da18d327f0a70ea1a9623
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Description:
modify I/O operations to support writing in sparse format
build host executable for making sparse image
Tests:
Using host executable:
./make_f2fs_host -S2000000000 userdata.img
fastboot flash userdata userdata.img
Using target executable:
adb push $OUT/system/bin/make_f2fs /system/bin
fastboot erase userdata
Analyzing the output image:
./make_f2fs_host -S2000000000 userdata.img
./make_f2fs_host test.img
simg2img userdata.img output.img
hexdump -C output.img >> output.txt
hexdump -C test.img >> test.txt
Bug: 62493641
Change-Id: I7589e1ee4ae597523d32c214944b40c8f7df07b6
Merged-In: I7589e1ee4ae597523d32c214944b40c8f7df07b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes include:
mkfs.f2fs: drop initial spaces for feature string
f2fs-tools: avoid build warnings
(origin/dev, dev) mkfs.f2fs: avoid wrong discard of dnode
f2fs-tools: fix the wrong message when errno is EBUSY
f2fs-tools: support to set and recognize CP_TRIMMED_FLAG
fsck.f2fs: sanity check segno and blk_off when building curseg array
fsck.f2fs: sanity check cp_payload before reading checkpoint
fsck.f2fs: sanity check blk_off for summary block entries
mkfs.f2fs: fix wrong segment assignment
f2fs-tools: sanity check segment count
fsck.f2fs: fix cur_valid_map buffer overflow
Fix mkfs out of tree builds
mkfs.f2fs: use noheap by default
libf2fs: avoid overwrite the c.start_sector by non-root device
...
Change-Id: I27adc30ff4439e5b3f7a290d81a3a783bf916d4a
Merged-In: I27adc30ff4439e5b3f7a290d81a3a783bf916d4a
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This patch initialize one variable for android build.
In addition, it avoids there-in build warnings.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
This patch adds an option to specify multiple devices for an f2fs instance.
Up to 7 devices in addition to the default device can be added.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids the below warnings.
libf2fs_zoned.c:39:8: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(file, "%s", str);
^
libf2fs_zoned.c: In function 'f2fs_get_zone_blocks':
libf2fs_zoned.c:72:8: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(file, "%s", str);
^
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
With the availability of the BLKREPORTZONE and BLKRESETZONE
ioctls, there is no need for using SG_IO to discover zoned
block devices characteristics. This simplifies the code.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SMR stands for "Shingled Magnetic Recording" which makes sense
only for hard disk drives (spinning rust). The ZBC/ZAC standards
enable management of SMR disks, but solid state drives may also
support those standards. So replace "SMR" with "zoned block device"
to avoid a HDD centric terminology.
In particular, rename the HMSMR feature to BLKZONED.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch avoids to print garbage data.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
SCSI-related operations are not permitted to AOSP biuld.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some systems '/proc/mounts' contains the entry '/dev/root'
as alias for the root device, while that alias doesn't actually
exist as symlink in /dev.
/proc/mounts:
/dev/root / f2fs rw,noatime,background_gc=on,user_xattr,acl,inline_data,extent_cache,active_logs=6 0 0
mount:
/dev/mmcblk1p1 on / type f2fs (rw,noatime,background_gc=on,user_xattr,acl,inline_data,extent_cache,active_logs=6)
If the root device is mounted RO, and we try to scan it, via
'fsck.f2fs /dev/mmcblk1p1', then fsck.f2fs exits because it can't
find the entry in /proc/mounts.
Try harder to identify the root device of the system first, and
in case we are operating on it, check also for '/dev/root' in mounts.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch has no functional change.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patche tries to use dev_read_block and dev_write_block as much as possible.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This adds to show disk information.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
This patch adds "-m" option to configure ZBC device.
This is to support host-managed SMR device and configure some major features
and on-disk layout in f2fs.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
F2FS can support 16T bytes at most. Limit the config.total_sectors
so that most parameters calculated according to it in sb/cp can be
limited correctly too.
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
Once f2fs_stop_checkpoint makes f2fs as readonly, only /proc/mounts shows
RDONLY whereas /etc/mtab does not.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This patch fixes to resolve build failure and warnings when compiling it
under AOSP.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This cleans up the bit operations.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch fixes test_bit_le functions for dentry bit operations.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
This patch fixes to store volume label as utf16 correctly.
Many conversion codes are copied from exfat-tools.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch modifies the existing bit operations.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch gives the version info for two libraries.
mkfs/libf2fs_format.la
lib/libf2fs.la
The versioning rule should be:
1. Start with version information of '0:0:0' for each libtool library.
2. Update the version information only immediately before a public release of
your software. More frequent updates are unnecessary, and only guarantee
that the current interface number gets larger faster.
2. If the library source code has changed at all since the last update, then
increment revision (c:r:a) becomes (c:r+1:a).
3. If any interfaces have been added, removed, or changed since the last update,
increment current, and set revision to 0.
4. If any interfaces have been added since the last public release, then
increment age.
5. If any interfaces have been removed or changed since the last public release,
then set age to 0.
quoted from:
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
It needs to consider different sector size when showing the total
size.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
If f2fs is mounted as ro, we can do fsck.f2fs.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
The minimum volume size is determined while preparing superblock.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This patch introduces to set the default overprovision space according to the
partition size in order to provide more space.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch shows correct information about total_sectors.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since f2fs support large sector size in commit 55cf9cb63f0e "f2fs: support large
sector size", block device with sector size of 512/1024/2048/4096 bytes can be
supported.
But mkfs.f2fs still use default sector size: 512 bytes as sector size, let's fix
this issue in this patch.
v2:
o remove unneeded printed message when sector size is large than 512 bytes
suggested by Kinglong.
o show correct sector size in printed message.
o use config.sectors_per_blk instead of DEFAULT_SECTORS_PER_BLOCK suggested by
Kinglong.
v3:
o remove another unneeded printed message when sector size is large than 512
bytes suggested by Kinglong.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Reviewed-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch adds readahead system call to speed up node block reads.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|