ino = ext2fs_le32_to_cpu(bdata[j]);
if (release_orphan_inode(ctx, &ino, pd->block_buf))
goto return_abort;
+ bdata[j] = 0;
}
+ if (ext2fs_has_feature_metadata_csum(fs->super)) {
+ tail->ob_checksum =
+ ext2fs_cpu_to_le32(ext2fs_do_orphan_file_block_csum(fs,
+ pd->ino, pd->generation, blk, pd->buf));
+ }
+ pd->errcode = io_channel_write_blk64(fs->io, blk, 1, pd->buf);
+ if (pd->errcode)
+ goto return_abort;
return 0;
}
pd.ctx = ctx;
pd.abort = 0;
pd.errcode = 0;
+ pd.ino = orphan_inum;
+ pd.generation = orphan_inode.i_generation;
retval = ext2fs_block_iterate3(fs, orphan_inum,
BLOCK_FLAG_DATA_ONLY | BLOCK_FLAG_HOLE,
orphan_buf, process_orphan_block, &pd);
orphan_inum);
}
ret = 1;
+ } else {
+ ext2fs_clear_feature_orphan_present(fs->super);
+ ext2fs_mark_super_dirty(fs);
}
out:
ext2fs_free_mem(&orphan_buf);
Clearing orphaned inode 29 (uid=0, gid=0, mode=0100644, size=0)
Clearing orphaned inode 30 (uid=0, gid=0, mode=0100644, size=0)
Clearing orphaned inode 31 (uid=0, gid=0, mode=0100644, size=0)
-Pass 1: Checking inodes, blocks, and sizes
-Pass 2: Checking directory structure
-Pass 3: Checking directory connectivity
-Pass 4: Checking reference counts
-Pass 5: Checking group summary information
-Free inodes count wrong (2055, counted=2005).
-Fix? yes
-
-Orphan file (inode 12) block 0 is not clean.
-Clear? yes
-
-
-test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
-test_filesys: 43/2048 files (2.3% non-contiguous), 1650/8192 blocks
-Exit status is 1
+Setting free inodes count to 2005 (was 2055)
+test_filesys: clean, 43/2048 files, 1650/8192 blocks
+Exit status is 0