summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext2fs/ext2_fs_i.h1
-rw-r--r--ext2fs/inode.c20
-rw-r--r--pfinet/linux-src/include/linux/ext2_fs_i.h1
3 files changed, 14 insertions, 8 deletions
diff --git a/ext2fs/ext2_fs_i.h b/ext2fs/ext2_fs_i.h
index 72bcd5c0..eefdbfaf 100644
--- a/ext2fs/ext2_fs_i.h
+++ b/ext2fs/ext2_fs_i.h
@@ -35,7 +35,6 @@ struct ext2_inode_info {
__u32 i_next_alloc_goal;
__u32 i_prealloc_block;
__u32 i_prealloc_count;
- __u32 i_high_size;
int i_new_inode:1; /* Is a freshly allocated inode */
};
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index d83bedca..ccc8d699 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -198,13 +198,18 @@ diskfs_user_read_node (struct node *np, struct lookup_context *ctx)
else
{
info->i_dir_acl = 0;
- info->i_high_size = di->i_size_high;
- if (info->i_high_size) /* XXX */
+ if (sizeof (off_t) >= 8)
+ /* 64bit file size */
+ st->st_size += ((off_t) di->i_size_high) << 32;
+ else
{
- dino_deref (di);
- ext2_warning ("cannot handle large file inode %Ld", np->cache_id);
- diskfs_end_catch_exception ();
- return EFBIG;
+ if (di->i_size_high) /* XXX */
+ {
+ dino_deref (di);
+ ext2_warning ("cannot handle large file inode %Ld", np->cache_id);
+ diskfs_end_catch_exception ();
+ return EFBIG;
+ }
}
}
info->i_block_group = inode_group_num (np->cache_id);
@@ -426,6 +431,9 @@ write_node (struct node *np)
{
di->i_dtime = 0;
di->i_size = st->st_size;
+ if (sizeof (off_t) >= 8 && !S_ISDIR (st->st_mode))
+ /* 64bit file size */
+ di->i_size_high = st->st_size >> 32;
di->i_blocks = st->st_blocks;
}
diff --git a/pfinet/linux-src/include/linux/ext2_fs_i.h b/pfinet/linux-src/include/linux/ext2_fs_i.h
index 8f01f8ad..7df90213 100644
--- a/pfinet/linux-src/include/linux/ext2_fs_i.h
+++ b/pfinet/linux-src/include/linux/ext2_fs_i.h
@@ -35,7 +35,6 @@ struct ext2_inode_info {
__u32 i_next_alloc_goal;
__u32 i_prealloc_block;
__u32 i_prealloc_count;
- __u32 i_high_size;
int i_new_inode:1; /* Is a freshly allocated inode */
};