| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Currently, during format volume, it does nothing on trim_device function.
Leaving user data unwipe before format. User data is recoverable even
with master clear. This patch fix it.
SAMBAR-729
Change-Id: Ie9197554aac9118747f4c95d189230283a276766
(cherry picked from commit 6b39b93d83ab4ccb1913ecbc7a5a3e16766a011f)
(cherry picked from commit 8aa4c4b9737e7e31a2648c3795a080f1772c8fdf)
|
|
|
|
|
|
| |
This version includes mostly bug fixes.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
On systems using unsigned char as default (char)EOF != EOF.
Use int to store returned value of getopt to make it work on all platforms.
Signed-off-by: Michael Lass <bevan@bi-co.net>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
Previously, only data blocks locating in its inode block could be fixed.
This patch investigates direct node blocks to fix indices too.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This patch fixes memory leak in mkfs.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Change-Id: I5c3845703943dd48f97102908c2077b915501b4d
|
|
|
|
|
|
| |
This patch adds readahead system call to speed up node block reads.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
SIT types can be wrong when active_logs are 2 or 4.
So, let's fix this implicitly.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fibmap shows ino, size, blocks with incorrectly decimal number, fix it.
Before:
--------------------------------------------
dev [8:16]
ino [0x 238ea : 0]
mode [0x 81a4 : 33188]
nlink [0x 1 : 1]
uid [0x 0 : 0]
gid [0x 0 : 0]
size [0x 79e00 : 0]
blksize [0x 1000 : 4096]
blocks [0x 268 : 0]
--------------------------------------------
Patched:
--------------------------------------------
dev [8:16]
ino [0x 238ea : 145642]
mode [0x 81a4 : 33188]
nlink [0x 1 : 1]
uid [0x 0 : 0]
gid [0x 0 : 0]
size [0x 79e00 : 499200]
blksize [0x 1000 : 4096]
blocks [0x 268 : 616]
--------------------------------------------
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
include/f2fs_fs.h checks the HAVE_BYTESWAP_H conditional, but it is
never checked for in configure.
Add that header to the list of headers checked for.
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>
|
|
|
|
|
|
|
| |
This patch adds parse.f2fs to retrieve process information and an amount
of data reads and writes from given IO trace got by f2fs.
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
|
|
|
|
|
|
|
| |
This patch introduces a feature to dump owner information of given block
address.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
If hot or warm data blocks were moved to the cold log, we should remain them
in the cold log.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Remove build warning.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
This is for conversion from cpu to little endian and vice versa.
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
This patch is for optimization related to format
o reduce 2 blocks for data summaries
o reduce initial mount time after mkfs.f2fs
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
|
| |
One of the cases would update the dentries but not set
fixed=1 causing the update to not be written out.
Change-Id: I111d599f93f7d5306dacd7d62da946fdb5c262ee
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This patch removed a false alarm when detecting any inconsistency in SIT types.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
To show better output.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
Let's show orphan inode information when fixing partition.
Otherwise, it causes a false alarm.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
|
| |
If we use regular file instead block device, let's reclaim its free
space.
Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
| |
This is to identify when the format was done.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Sometimes, SIT entry type is broken, so we need to rebuild it.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
|\
| |
| |
| | |
Android 5.1.0 release 1
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge remote-tracking branch 'goog/lmp-mr1-dev-plus-aosp' into update_to_140
* goog/lmp-mr1-dev-plus-aosp: (45 commits)
fsck.f2fs: actually flag the fixed dentries as fixed
f2fs: use last_blk for print dentries
fsck.f2fs: fix DATA_EXIST flag for old partition
fsck.f2fs: attempt to identify bad dentries
Update build version from 1.2.0 to 1.4.0 after merge.
fsck.f2fs: show inline status of inode
fsck.f2fs: fix wrongly allocated 0'th block for inline_data
fsck.f2fs: fix link count correctly
fsck.f2fs: fix wrong hash_code made by previous buggy code
fsck.f2fs: support inline_dentry
fsck.f2fs: fix superblock offset
mkfs.f2fs: avoid build warning
fsck.f2fs: fix wrong block addres of nids
mkfs.f2fs: possible endianes bug in mkfs.f2fs roll-forward speed
f2fs-tools: fix for build big-endian processors
f2fs-tools: release 1.4.0
f2fstat: enhance readability of output
tracepoint.sh: update latest tracepoints
f2fs: rearrange options to remove redundant check
fsck.f2fs: add auto_fix feature
...
Bug: 17640053
Bug: 18292088
Change-Id: Idab448af4fccd7033ca5e3e55e3f3472673df622
Signed-off-by: JP Abgrall <jpa@google.com>
|
|\ \ \
| | |/
| |/|
| | | |
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>
|