| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I344bec1a7d0837d0775cfc133185b01db5a00366
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a followup from 056e4b04fc44a006d5529bafbf87b1d73296c665
Now the blk is marked as fixed so that the callers can write it back.
Change-Id: I99c94bc39e772e0d0baab81bd741ce55416ce0e6
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
This should fix the DATA_EXIST before recent inline_data is enabled.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Change-Id: I055399adc13a81a7007a5723720368274b012fe7
|
| |
| |
| |
| |
| |
| | |
This patch adds to show inline status of each inode.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
This patch fixes not to allocate any 0'th block for inline_data.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
We should do *goto check* if there is something to fix.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| |
| | |
The previous f2fs remained wrong hash_code for international characters.
So, fsck.f2fs should fix that hash_code with current valid names.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
This patch implements inline_dentry feature.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
The second offset should be F2FS_BLKSIZE + F2FS_SUPER_OFFSET.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
Avoid build warning for printf.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| |
| | |
This patch avoids assert when nid has wrong block address.
Let's fix this.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I might found a bug in mkfs.f2fs. while experimenting with f2fs on my big
endian MIPS32 device (platform lantiq, 14.07-rc3, uclibc).
I ran into an issue that mkfs.f2fs, was not able to format block devices if I
did not specify the sector count manually.
I hunted it down to lib/libf2fs.c.
After I found that the detected sector count equals to the wanted sector count
shifted left (32+9) times.
I found two issues:
Firstly it uses ioctl BLKGETSIZE, which writes to an uint32_t the size of the
device.
As c->total_sectors is of type uint64_t, the value is written in to the first
4 bytes.
That explained the left shift of 32 bits.
Secondly BLKGETSIZE determines the size of the device in bytes (AFAIK, learned
by observation).
In the first branch of the if-block patched below, the c->total_sectors is
calculated by
c->total_sectors = stat_buf.st_size / c->sector_size;
The else branch omits the devision. sector_sice is mostly 512, that explained
the left shift by 9 bytes.
* fixes sector count calculation
* uses BLKGETSIZE64 if avail
Signed-off-by: joerg jungermann <jj@borkum.net>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This version includes:
- fsck.f2fs fixing corrupted images/partitions
- dump.f2fs retrieving speicific file
- bug fixes on f2fsstat and fibmap.f2fs
- refactor code blocks for android build
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| |
| |
| | |
This patch enhances output readability of f2fstat.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |
| |
| |
| | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\
| | |
| | |
| | |
| | | |
* commit '73b6e3eb4e944338edd80b4f27c29b7aa31c76f2':
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>
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'de6c1c7ce25841547813c71ca3b6d067300f0530':
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>
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'bc6a70006baab16bf51e9cc7a7b042f734d4ccd2':
fsck.f2fs: avoid build warnings
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '50442accacf4e9c49e87bdb00378fe0ddee0266a':
fsck.f2fs: remove list.h
|
| | |
| | |
| | |
| | |
| | |
| | | |
Just use list_head only.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '10d97dd1b386abcceec1b1bf590a3711d93e8c1c':
fsck.f2fs: check next block is free or not
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If block allocation is made to the next block offset, we should drop that
block.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '893312ced238b9ee93c5427aa6e6c1f29fe39899':
fsck.f2fs: fix checkpoint
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- fix nat entries
- fix sit entries
- fix checkpoint
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '6591dadcb05b7787dfa4c703728f773069dece04':
fsck.f2fs: handle correctly segment summary entries
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '1118af29cae53275851c3b1f7ef266e67cc7e2a7':
fsck.f2fs: remove corrupted xattr block
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '83e54446710466a0c4493236079184131f0004ce':
fsck.f2fs: corrupted orphan inode will be removed
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '6b20b0d6788b4e7241c3acad1560d8eaad80b319':
fsck.f2fs: remove dentry if its inode block is corrupted
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '269eac2e0346e92fa1428bbfbc3fa50233f8c4ef':
fsck.f2fs: add fixing messeages
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'dc530859c5e422b10ab70bc3b9d4b7ff0d004d57':
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>
|
| |\|
| | |
| | |
| | |
| | | |
* commit 'fffeed796a79fa6621d01b0e4c5fa18d9d89cdd7':
fsck.f2fs: give a chance to recover sit entries
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch skips initial verfication on SIT entries, which checks the number of
valid blocks from its bitmap.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '59c0e13ed90a6395e5cdaaed1608358c799bb0e4':
fsck.f2fs: cleanup mount.c
|
| | |
| | |
| | |
| | | |
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '3b4b82634489b2f9d367b1f897d51a341208d163':
fsck.f2fs: handle error cases
|
| | |
| | |
| | |
| | |
| | |
| | | |
Do sanity check first and then update metadata.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
| |\|
| | |
| | |
| | |
| | | |
* commit '02d04218720248f35ee2bcf4ca34c8b0e6e05140':
fsck.f2fs: remove return value of get_node_info
|