aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-12-31 19:37:31 -0500
committerTheodore Ts'o <tytso@mit.edu>2020-01-01 13:41:35 -0500
commitf77260a15727a308bd7580c2a1d9f105cfd17013 (patch)
tree7992f6566037102b4b54be2889b7f417864fed99
parent1d4074f3ed3da1fde3b6bbbfa744ab92823886df (diff)
downloade2fsprogs-f77260a15727a308bd7580c2a1d9f105cfd17013.tar.gz
libext2fs: use ext2fs_file_llseek in inode_io.c
Enable the use of files > 2GB when using the inode_io manager. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--lib/ext2fs/inode_io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ext2fs/inode_io.c b/lib/ext2fs/inode_io.c
index f3d94c89d..d7474a6d3 100644
--- a/lib/ext2fs/inode_io.c
+++ b/lib/ext2fs/inode_io.c
@@ -215,9 +215,9 @@ static errcode_t inode_read_blk64(io_channel channel,
data = (struct inode_private_data *) channel->private_data;
EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
- if ((retval = ext2fs_file_lseek(data->file,
- block * channel->block_size,
- EXT2_SEEK_SET, 0)))
+ if ((retval = ext2fs_file_llseek(data->file,
+ (ext2_off64_t)(block * channel->block_size),
+ EXT2_SEEK_SET, 0)))
return retval;
count = (count < 0) ? -count : (count * channel->block_size);
@@ -241,9 +241,9 @@ static errcode_t inode_write_blk64(io_channel channel,
data = (struct inode_private_data *) channel->private_data;
EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_INODE_IO_CHANNEL);
- if ((retval = ext2fs_file_lseek(data->file,
- block * channel->block_size,
- EXT2_SEEK_SET, 0)))
+ if ((retval = ext2fs_file_llseek(data->file,
+ (ext2_off64_t) (block * channel->block_size),
+ EXT2_SEEK_SET, 0)))
return retval;
count = (count < 0) ? -count : (count * channel->block_size);