History log of /external/f2fs-tools/include/f2fs_fs.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
400a84068b47b92a45c30a756669062e7d81077c 05-Feb-2015 Chao Yu <chao2.yu@samsung.com> fsck.f2fs: support large sector size

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 fsck.f2fs still use default F2FS_LOG_SECTOR_SIZE/F2FS_LOG_SECTORS_PER_BLOCK to
verify related data in f2fs image, it's wrong, let's fix this issue in this patch.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
8bcdc5fdb206196241dc6fc535e6d285d4985201 02-Dec-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: readahead node blocks to speed up

This patch adds readahead system call to speed up node block reads.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
3bcf2237352307b2e9820e635097358eda3d356e 15-Jan-2015 Jaegeuk Kim <jaegeuk@kernel.org> dump.f2fs: show checkpoint flag

This patch is to show the checkpoint flag.
With this flag, we can guess the last status of the partition.
And, this can be used by xfstests.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
550702090691af07a3282119ef4f37440c93829e 25-Dec-2014 Yann E. MORIN <yann.morin.1998@free.fr> configure: add check for bswap_64

include/f2fs_fs.h checks the HAVE_BSWAP_64 conidtional, but configure
nevers checks for it.

Add a check that the function is indeed declared, and fix the variable
name to match the naming scheme of autoconf (and not those of WAF like
is used by samba), and adapt the check as suggested in the autoconf
manual.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
060292e67ad6c191be086c6dd520fd7365050ed6 17-Nov-2014 Changman Lee <cm224.lee@samsung.com> mkfs.f2fs: introduce some macros to simplify coding style

This patch tries to simplify coding style for readability.
Rename shortly
o rename super_block to sb

And, introduce some macros.
o set/get_cp
o set/get_sb
o next/prev_zone, last_zone and last_section
o ALIGN, SEG_ALIGN and ZONE_ALIGN

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
0f736527eb38eae3778b8be81921a9c458ad647f 07-Nov-2014 Jaegeuk Kim <jaegeuk@kernel.org> mkfs.f2fs: give a kernel version for initial format

This is to identify when the format was done.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
c07795e73cbc509286e35193759e80d65ee12a44 07-Nov-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: trigger fsck.f2fs when new change was made

This patch remains user specified triggering information in superblock.
Then, if the information was changed, fsck.f2fs is triggered.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
9464be283ebdbb17c8940bea6c8a4f7acb75299a 31-Oct-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: fix DATA_EXIST flag for old partition

This should fix the DATA_EXIST before recent inline_data is enabled.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
2c82eafaa38922a370545dc56d6210bf94b929e9 29-Oct-2014 JP Abgrall <jpa@google.com> fsck.f2fs: attempt to identify bad dentries

If a dentry has a bad ino (fsck_chk_nod_blk() fails)
and has a name len of 0, then __chk_dentries() will end up stuck:

....
[__chk_dentries: 663] [ 4]-[0x0] name[] len[0x0] ino[0x5f1710dc] type[0xd1]
[ASSERT] (sanity_check_nid: 184) --> nid is not valid. [0x5f1710dc]
[__chk_dentries: 663] [ 4]-[0x0] name[] len[0x0] ino[0x5f1710dc] type[0xd1]
[ASSERT] (sanity_check_nid: 184) --> nid is not valid. [0x5f1710dc]
[__chk_dentries: 663] [ 4]-[0x0] name[] len[0x0] ino[0x5f1710dc] type[0xd1]
[ASSERT] (sanity_check_nid: 184) --> nid is not valid. [0x5f1710dc]
....

This change tries to identify bad dentries:
- is the ino a valid NID?
- is the FILE_TYPE a happy type?

Change-Id: I5fb2f3869c96f2c928baaace148de1af102e558e
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
3a8c9a69525f75a6c59bee0eb3d882ddc341b3f1 15-Oct-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: support inline_dentry

This patch implements inline_dentry feature.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
7b74ed3d7cc84c3bb7e85b825cf17540baa3bbfa 23-Sep-2014 Jaegeuk Kim <jaegeuk@kernel.org> f2fs-tools: fix for build big-endian processors

This patch fixes build failure on big-endian systems.

Reported-and-Tested-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
73b6e3eb4e944338edd80b4f27c29b7aa31c76f2 04-Sep-2014 Jaegeuk Kim <jaegeuk@kernel.org> f2fs: rearrange options to remove redundant check

This patch summarizes the usage of options.

-a : auto_fix, fix corruption, only if f2fs reported some potential errors
-f : force, fix corruption entire partition
None : prompt, if fsck.f2fs detets any corruption

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
de6c1c7ce25841547813c71ca3b6d067300f0530 03-Sep-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: add auto_fix feature

This patch adds an auto_fix feature which fixes inconsistency of f2fs images.

E.g.,

With this option, -a, fsck.f2fs tries to fix inconsistency only if its valid
checkpoint has CP_FSCK_FLAG, written by previous bug_on cases.

So, normally it does fix nothing, so that there is no performance regression.
But, if a sort of corruption was reported by the f2fs module, this tries to
fix potential corrupted partition.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
269eac2e0346e92fa1428bbfbc3fa50233f8c4ef 28-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: add fixing messeages

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
dc530859c5e422b10ab70bc3b9d4b7ff0d004d57 29-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: fix inode block inconsistency

This patch is to fix inode block inconsistency such as iblocks and ilinks.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
3b4b82634489b2f9d367b1f897d51a341208d163 28-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: handle error cases

Do sanity check first and then update metadata.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
b3a4f9457718eb1aecb85d082f9e6f737ce3af86 28-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: clean up codes

Fix wrong coding style.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
f4ef4a14e978e7328037b43a8a6ec9d2a2d4bb5a 27-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> fsck.f2fs: retry to fix corrupted image

This patch adds a facility to retry conducting fsck.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
347fe81d8e860d29a254ac066d87c5efe87d717b 27-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> f2fs_dentry_hash: avoid casting unsigned char to singed char

This can hurt when calculating hash value, resulting in false alarm.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
f70644c5047f9f912836724a994ccab18b5b5dd1 19-Aug-2014 Jaegeuk Kim <jaegeuk@kernel.org> dump.f2fs: support dump_file from image

This patch adds supporting dump_file, which can extract a file from image.

You can simply select [yes|no] when doing dump.f2fs -i [inode number] [img].

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
2794728f818c72541be052d1b54559d79d8a3aa7 10-Jul-2014 Changman Lee <cm224.lee@samsung.com> mkfs.f2fs: large volume support

This patch supports large volume over about 3TB.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
c5786963aef93bb7747cb04454e1041738b3255f 13-Jun-2014 Jaegeuk Kim <jaegeuk@kernel.org> libf2fs, fsck, mkfs: call f2fs_finalize_device before exit

The fsck tool should call f2fs_finalize_device before exit to close the device
file.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: I145413c94339d8941e4d7da8545ca017e76c61f2
/external/f2fs-tools/include/f2fs_fs.h
fd9816f31e5cd668962f00511d7a91d055d76048 12-May-2014 Changman Lee <cm224.lee@samsung.com> fsck.f2fs: large volume support

This patch support large volume over about 3TB.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
[Jaegeuk Kim: add missing cp_payload in f2fs_super_block]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
/external/f2fs-tools/include/f2fs_fs.h
0fbdf6cbd4dfc633454eba2f841c123789e297ad 06-Apr-2014 Jaegeuk Kim <jaegeuk.kim@samsung.com> f2fs-tools: announce dual licenses with GPL and LGPL v2

This patch announces LGPL v2 for the following files.
- include/f2fs_fs.h
- lib/libf2fs.c
- lib/libf2fs_io.c
- mkfs/f2fs_format.c
- mkfs/f2fs_format_main.c
- mkfs/f2fs_format_utils.c
- mkfs/f2fs_format_utils.h

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
3c85e737308ef95629b232745d6a8d141d87cc9a 14-May-2014 JP Abgrall <jpa@google.com> Cleanup various build warnings (signed vs unsigned, unused vars,...)

* removed unused includes.
* removed unused parameters.
* Fixed a bunch of warnings around:
int i;
if (i < some_uint) ...
and
u32 x;
...
if (x < 0) return error;
* Protect BLKDISCARD usage if it is not available.

Change-Id: Iede035b1beb2df01c961589a69aff47a5258ecd2
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
a35529fce0c5171562ec0ebebcc6120d1604924b 01-Apr-2014 JP Abgrall <jpa@google.com> format: add support for dev_fill() and extra dev_*() debugging.

Support an fs_io dev_fill().
This helps with devices that actually already return 0 on uninitialized
data. It also helps with in memory devices using sparse libs: don't
allocate a block of 0s.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
99250ec1aa15ea329fb090fd8f4c1e7e7b50bba3 27-Feb-2014 Jaegeuk Kim <jaegeuk.kim@samsung.com> mkfs: support large directory

This patch synchronizes mkfs with the latest f2fs configuration in which
supports large directory by assigning dir_level.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
858c4039c85f7c00c57925902985701b1e083555 05-Feb-2014 Jaegeuk Kim <jaegeuk.kim@samsung.com> mkfs, fsck: change the results for readability

This patch cleans up several printing formats.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
cb54e79739672366d849e02a3068f857c6bb544c 09-Jan-2014 JP Abgrall <jpa@google.com> fix typo around CONFIG_64BIT usage

Would do 64 BITS_PER_LONG when CONFIG_64BIT was NOT defined,
causing BITS_PER_LONG to be wrong on 32bit systems.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
061ee67915ba3e8c86bde89a2efb1b8a9aadfb37 25-Oct-2013 Huajun Li <huajun.li@intel.com> f2fs-tools: add inline data check

Add inline data check

Signed-off-by: Weihong Xu <weihong.xu@intel.com>
Signed-off-by: Huajun Li <huajun.li@intel.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
465e4e7f10f59efba184fdd0788e92ea1488011c 08-Oct-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> libf2fs: avoid warning of implicit declaration

This patch adds extern declaration.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
76a069430a295a27bf478d4a5d2fd71112a11a54 08-Oct-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> fsck: fix to handle file types correctly

The file type is based on the number, not bit operations.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
cd1e4704d0cbf1cbb49b3f33c576566b4b1e296e 20-Aug-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> fsck, lib: support inline xattr

This patch adjusts the modification to handle inline xattrs.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
2c877a862d6d22ff5324e90b726c7d6a26febfb7 02-Aug-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> libf2fs: check more conditions on mounted filesystem

In the case of lazy umount, "umount -l", some processes are able to use the
file system even if its mountpoint was disconnected.
At this moment, we should not allow mkfs.f2fs.
This patch adds this condition check.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
57baa23a3279a4b9e9df0ab92ee20a2c79b839d8 30-Jul-2013 Changman Lee <cm224.lee@samsung.com> f2fs-tools: add option to display directory tree

This option shows directory tree of f2fs.

Usage: fsck.f2fs -t /dev/sdx

`-- p0
|-- f4
`-- d6
|-- f5e
|-- cb6
|-- fdb
|-- fe8
`-- l9a

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
7f35b548d4b0e3c8577ad7a09433e589a0ab3f2a 04-Jul-2013 Changman Lee <cm224.lee@samsung.com> f2fs-tools: add fsck.f2fs and dump.f2fs

fsck.f2fs checks file system consistency, but does not repair a broken
file system yet.
dump.f2fs shows the information of a specific inode and makes dump file
of SSA and SIT.
f2fs checks file system consistency as follows:
o When data about used area and its metadata are identical,
f2fs is considered consistent. To verify such consistency, we use
three bitmaps: nat_area_bitmap, sit_area_bitmap, and main_area_bitmap.
First, each bit in nat_area_bitmap corresponds to a nid in NAT.
Second, each bit in sit_area_bitmap corresponds to a valid block in a
segment. This bitmap is same to the total valid_map of f2fs_sit_entries
in SIT.
Last, each bit in main_area_bitmap corresponds to a block in main area
except meta area.
After a consistency check of each block, we set or clear the
corresponding bit of each bitmap.
From the root node, we start consistency check. The verified
information varies according to block type.
1. NODE
- Read information of node block from NAT
- Check if block address is allocated using node info.
- Check if the type of f2fs_summary related to nid in SSA is NODE.
- Update the corresponding bit in nat_area_bitmap.
- Update the corresponding bit in sit_area_bitmap.
- Set the corresponding bit in main_area_bitmap to 1.
- Then, read node block. According to its attribute, explore
inode/direct node/indirect node/double indirect node
recursively.
- If it is an inode block, we also check its xattr and hard link.
2. DATA
- Check if the type of f2fs_summary related to nid in SSA is DATA.
- Set the corresponding bits of sit_area_bitmap and
main_area_bitmap to visited
- If it is a dentry block, traverse each dentries that may be
regular
file or directory. At this time, it will check inode block again.
Finally, we verify whether
- every nat_area_bitmap is visited
- any unreachable hard link exists
- values of sit_area_bitmap and main_area_bitmap are identical
- total_valid_block_count/node_count/inode_count are correct

Usage:
o fsck.f2fs
# fsck.f2fs /dev/sdx
options:
-d debug level [default:0]
o dump.f2fs
# dump.f2fs -i [ino] /dev/sdx
# dump.f2fs -s 0~-1 /dev/sdx (SIT dump)
# dump.f2fs -a 0~-1 /dev/sdx (SSA dump)
options:
-d debug level [default:0]
-i inode no (hex)
-s [SIT dump segno from #1~#2 (decimal), for all 0~-1]
-a [SSA dump segno from #1~#2 (decimal), for all 0~-1]

Note: To use dump.f2fs, please run make install or ln -s fsck.f2fs
dump.f2fs

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Byoung Geun Kim <bgbg.kim@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
cc9d9caeb6853d38297d97d3dd4731c452418f02 19-Jun-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> lib, mkfs: fix endian conversion for crc calculation

Let's store the crc value for the checkpoint blocks with __le32.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
fef98ebdf3a7728017cb3d0ae4ffedc5405e531d 03-Apr-2013 Changman Lee <cm224.lee@samsung.com> mkfs: add option to disable trim at format

This patch adds an option to disable trim command at format.
Default operation sends trim command to device.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
9799d6364dc93e1fd259d812d4a50ed984a6456b 03-Apr-2013 Mike Fleetwood <mike.fleetwood@googlemail.com> mkfs: handle labels longer than 16 characters

Mkfs copies labels up to 512 characters into a the 16 character buffer
config.vol_label corrupting memory afterwards and causing a core dump.

# mkfs.f2fs -l aaaaaaaaaabbbbbbbbbbcccccccccc /dev/sda12

F2FS-tools: mkfs.f2fs Ver: 1.1.0 (2013-03-08)

Info: Label = aaaaaaaaaabbbbbbbbbbcccccccccc
Info: sector size = 512
Info: total sectors = 2097152 (in 512bytes)
Info: zone aligned segment0 blkaddr: 256
Segmentation fault (core dumped)

Make config.vol_label a pointer to the label in argv, rather than
copying it into a too small buffer.

Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
f5f440f08643f6b35ad0dd70a54805a5383c4a62 03-Mar-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> build: change f2fs_fs.h

Let's sync f2fs_fs.h in the kernel source tree.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
5043dffbd1d2b89c71966dde31780b0ca313b5c9 12-Feb-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> build: clean up the base functions

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
e69e4378500b836863dfb7f6e88e39935f23ae80 25-Jan-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> build: make several base functions as a library

Let's make a library and relocate functions for other tools like fsck.f2fs.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
2784bd55dd9730f3a5d2126c82094990fad053c1 25-Jan-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> build: sync f2fs_fs.h with current f2fs sources

Rearrange positions of all the data structures for easy synchronization between
f2fs-tools and f2fs kernel sources.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h
40b9f96587c191269a41b20bd2bd5000fc9db259 25-Jan-2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> build: move f2fs_format.h to ../include/f2fs_fs.h

This is to use f2fs.h globally, which will be used by other tools such as
fsck.f2fs.

Siged-mff-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
/external/f2fs-tools/include/f2fs_fs.h