aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-03-24 02:57:43 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-24 02:57:43 +0000
commit557f29137e9dec8f518a450e86e27ace84dc4807 (patch)
tree50a71f1dab6da427da5e0f8047f5d780a19c967a
parentf2654fd7ae6d230a30105a375e2b8852fb1c87c2 (diff)
parenta21f461a0f945b081e64d4d47356bca918940af7 (diff)
downloadf2fs-tools-557f29137e9dec8f518a450e86e27ace84dc4807.tar.gz
am a21f461a: fsck.f2fs: show orphan inodes when fixing partition
* commit 'a21f461a0f945b081e64d4d47356bca918940af7': fsck.f2fs: show orphan inodes when fixing partition
-rw-r--r--fsck/fsck.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 90ea441..4dbbc38 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -867,9 +867,6 @@ void fsck_chk_orphan_node(struct f2fs_sb_info *sbi)
if (!is_set_ckpt_flags(ckpt, CP_ORPHAN_PRESENT_FLAG))
return;
- if (config.fix_on)
- return;
-
start_blk = __start_cp_addr(sbi) + 1 +
le32_to_cpu(F2FS_RAW_SUPER(sbi)->cp_payload);
orphan_blkaddr = __start_sum_addr(sbi) - 1;
@@ -883,6 +880,11 @@ void fsck_chk_orphan_node(struct f2fs_sb_info *sbi)
for (j = 0; j < le32_to_cpu(orphan_blk->entry_count); j++) {
nid_t ino = le32_to_cpu(orphan_blk->ino[j]);
DBG(1, "[%3d] ino [0x%x]\n", i, ino);
+ if (config.fix_on) {
+ FIX_MSG("Discard orphan inodes: ino [0x%x]\n",
+ ino);
+ continue;
+ }
blk_cnt = 1;
fsck_chk_node_blk(sbi, NULL, ino,
F2FS_FT_ORPHAN, TYPE_INODE, &blk_cnt);