Many files:
block.c (ext2fs_block_iterate3): Make the ref_offset field contain the
offset into the inode.i_blocks array when ref_block is zero. Since we
haven't done a formal release of e2fsprogs since block_iterate2 was
first introduced, I removed block_iterate2, and renamed block_iterate3
to be block_iterate2.
bb_inode.c, bmove.c, dblist_dir.c, dir_iterate.c, expanddir.c,
ext2fs.h, ext2fsP.h, read_bb.c: Change use of block_iterate and
block_iterate2 to block_iterate2 with the new prototype for the
interator function. (using blkcnt_t forr blockcount)
ChangeLog, debugfs.c, ls.c, lsdel.c:
debugfs.c, ls.c, lsdel.c: Add support for large files. (The high 32
bits share space with the i_dir_acl field.)
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 85d14b0..232d0be 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -306,16 +306,24 @@
fprintf(out, "Inode: %ld Type: %s ", inode_num, i_type);
fprintf(out, "Mode: %04o Flags: 0x%x Version: %d\n",
inode.i_mode & 0777, inode.i_flags, inode.i_version);
- fprintf(out, "User: %5d Group: %5d Size: %d\n",
- inode.i_uid, inode.i_gid, inode.i_size);
+ fprintf(out, "User: %5d Group: %5d Size: ",
+ inode.i_uid, inode.i_gid);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ fprintf(out, "%d\n", inode.i_size);
+ else {
+ __u64 i_size = (inode.i_size |
+ ((unsigned long long)inode.i_size_high << 32));
+
+ fprintf(out, "%lld\n", i_size);
+ }
if (current_fs->super->s_creator_os == EXT2_OS_HURD)
fprintf(out,
"File ACL: %d Directory ACL: %d Translator: %d\n",
- inode.i_file_acl, inode.i_dir_acl,
+ inode.i_file_acl, LINUX_S_ISDIR(inode.i_mode) ? inode.i_dir_acl : 0,
inode.osd1.hurd1.h_i_translator);
else
fprintf(out, "File ACL: %d Directory ACL: %d\n",
- inode.i_file_acl, inode.i_dir_acl);
+ inode.i_file_acl, LINUX_S_ISDIR(inode.i_mode) ? inode.i_dir_acl : 0);
fprintf(out, "Links: %d Blockcount: %d\n", inode.i_links_count,
inode.i_blocks);
switch (os) {
@@ -681,7 +689,10 @@
modify_u32(argv[0], "Reserved1", decimal_format, &inode.i_reserved1);
#endif
modify_u32(argv[0], "File acl", decimal_format, &inode.i_file_acl);
- modify_u32(argv[0], "Directory acl", decimal_format, &inode.i_dir_acl);
+ if (LINUX_S_ISDIR(inode.i_mode))
+ modify_u32(argv[0], "Directory acl", decimal_format, &inode.i_dir_acl);
+ else
+ modify_u32(argv[0], "High 32bits of size", decimal_format, &inode.i_size_high);
if (current_fs->super->s_creator_os == EXT2_OS_HURD)
modify_u32(argv[0], "Translator Block",