Many files:
unix.c: Fix bug in check of feature set, to make sure we can really
fix this filesystem.
problem.h: Make blkcount type to be of type blkcnt_t. Make the num
field be a 64 bit type. Add the problem code PR_1_FEATURE_LARGE_FILES
problem.c: Add table entry for the problem code PR_1_FEATURE_LARGE_FILES.
pass1.c (e2fsck_pass1): A non-zero i_dir_acl field is only a problem
for directory inodes. (Since it is also i_size_high now.) If there
are no large_files, then clear the LARGE_FLAG feature flag. If there
are large_files, but the LARGE_FLAG feature flag is not set, complain
and offer to fix it.
(check_blocks): Add support to deal with non-directory inodes that
have i_size_high set (i.e., large_files). Don't give an error if a
directory has preallocated blocks, to support the DIR_PREALLOC
feature.
(process_block, process_bad_block): The blockcnt variable is a type of
blkcnt_t, for conversion to the new block_iterate2.
pass2.c (process_bad_inode): A non-zero i_dir_acl field is only a
problem for directory inodes. (Since it is also i_size_high now.)
message.c (expand_inode_expression): Print a 64-bits of the inode size
for non-directory inodes. (Directory inodes can only use a 32-bit
directory acl size, since i_size_high is shared with i_dir_acl.) Add
sanity check so that trying to print out the directory acl on a
non-directory inode will print zero. (expand_percent_expression): %B
and %N, which print pctx->blkcount and pctx->num, can now be 64 bit
variables. Print them using the "%lld" format if EXT2_NO_64_TYPE is
not defined.
e2fsck.h: Add the large_flagsfield to the e2fsck context.
e2fsck.c (e2fsck_reset_context): Clear the large_flags field.
ChangeLog, expect.1:
f_messy_inode: Modify test to deal with changes to support 64-bit size
files. (/MAKEDEV had i_dir_acl, now i_size_high, set.)
diff --git a/e2fsck/message.c b/e2fsck/message.c
index 82cb423..c839bbf 100644
--- a/e2fsck/message.c
+++ b/e2fsck/message.c
@@ -197,7 +197,20 @@
switch (ch) {
case 's':
- printf("%u", inode->i_size);
+ if (LINUX_S_ISDIR(inode->i_mode))
+ printf("%u", inode->i_size);
+ else {
+#ifdef EXT2_NO_64_TYPE
+ if (inode->i_size_high)
+ printf("0x%x%08x", inode->i_size_high,
+ inode->i_size);
+ else
+ printf("%u", inode->i_size);
+#else
+ printf("%llu", (inode->i_size |
+ ((__u64) inode->i_size_high << 32)));
+#endif
+ }
break;
case 'b':
printf("%u", inode->i_blocks);
@@ -220,7 +233,8 @@
printf("%u", inode->i_file_acl);
break;
case 'd':
- printf("%u", inode->i_dir_acl);
+ printf("%u", (LINUX_S_ISDIR(inode->i_mode) ?
+ inode->i_dir_acl : 0));
break;
default:
no_inode:
@@ -282,7 +296,11 @@
printf("%u", ctx->blk);
break;
case 'B':
+#ifdef EXT2_NO_64_TYPE
printf("%d", ctx->blkcount);
+#else
+ printf("%lld", ctx->blkcount);
+#endif
break;
case 'c':
printf("%u", ctx->blk2);
@@ -303,7 +321,11 @@
printf("%s", error_message(ctx->errcode));
break;
case 'N':
+#ifdef EXT2_NO_64_TYPE
printf("%u", ctx->num);
+#else
+ printf("%llu", ctx->num);
+#endif
break;
case 'p':
print_pathname(fs, ctx->ino, 0);