From: "Jose R. Santos" <jrs@us.ibm.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: [RFC PATCH 3/3][e2fsprogs] Add {read,write}_blk64 to inode_io.c
Date: Mon, 03 Mar 2008 10:41:29 -0600 [thread overview]
Message-ID: <20080303164129.5557.14237.stgit@gara> (raw)
In-Reply-To: <20080303164113.5557.68102.stgit@gara>
From: Jose R. Santos <jrs@us.ibm.com>
Add {read,write}_blk64 to inode_io.c
Add 64-bit block capable routines to inode IO manager. Since fileio.c
does not yet have 64bit support, these routines will not handle 64bit
block numbers correctly (currently working on that).
Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
--
lib/ext2fs/inode_io.c | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/lib/ext2fs/inode_io.c b/lib/ext2fs/inode_io.c
index b5c08b9..0e23494 100644
--- a/lib/ext2fs/inode_io.c
+++ b/lib/ext2fs/inode_io.c
@@ -56,7 +56,11 @@ static errcode_t inode_write_blk(io_channel channel, unsigned long block,
static errcode_t inode_flush(io_channel channel);
static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
int size, const void *data);
-
+static errcode_t inode_read_blk64(io_channel channel,
+ unsigned long long block, int count, void *data);
+static errcode_t inode_write_blk64(io_channel channel,
+ unsigned long long block, int count, const void *data);
+
static struct struct_io_manager struct_inode_manager = {
EXT2_ET_MAGIC_IO_MANAGER,
"Inode I/O Manager",
@@ -66,7 +70,11 @@ static struct struct_io_manager struct_inode_manager = {
inode_read_blk,
inode_write_blk,
inode_flush,
- inode_write_byte
+ inode_write_byte,
+ NULL,
+ NULL,
+ inode_read_blk64,
+ inode_write_blk64
};
io_manager inode_io_manager = &struct_inode_manager;
@@ -197,8 +205,8 @@ static errcode_t inode_set_blksize(io_channel channel, int blksize)
}
-static errcode_t inode_read_blk(io_channel channel, unsigned long block,
- int count, void *buf)
+static errcode_t inode_read_blk64(io_channel channel,
+ unsigned long long block, int count, void *buf)
{
struct inode_private_data *data;
errcode_t retval;
@@ -217,8 +225,14 @@ static errcode_t inode_read_blk(io_channel channel, unsigned long block,
return ext2fs_file_read(data->file, buf, count, 0);
}
-static errcode_t inode_write_blk(io_channel channel, unsigned long block,
- int count, const void *buf)
+static errcode_t inode_read_blk(io_channel channel, unsigned long block,
+ int count, void *buf)
+{
+ return inode_read_blk64(channel, block, count, buf);
+}
+
+static errcode_t inode_write_blk64(io_channel channel,
+ unsigned long long block, int count, const void *buf)
{
struct inode_private_data *data;
errcode_t retval;
@@ -237,6 +251,12 @@ static errcode_t inode_write_blk(io_channel channel, unsigned long block,
return ext2fs_file_write(data->file, buf, count, 0);
}
+static errcode_t inode_write_blk(io_channel channel, unsigned long block,
+ int count, const void *buf)
+{
+ return inode_write_blk64(channel, block, count, buf);
+}
+
static errcode_t inode_write_byte(io_channel channel, unsigned long offset,
int size, const void *buf)
{
prev parent reply other threads:[~2008-03-03 16:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 16:41 [RFC PATCH 0/3][e2fsprogs] 64bit IO manager support Jose R. Santos
2008-03-03 16:41 ` [RFC PATCH 1/3][e2fsprogs] Add 64-bit IO manager operations to struct_io_manager Jose R. Santos
2008-03-10 14:40 ` Theodore Tso
2008-03-03 16:41 ` [RFC PATCH 2/3][e2fsprogs] Add {read,write}_blk64 to unix_io.c Jose R. Santos
2008-03-03 16:41 ` Jose R. Santos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080303164129.5557.14237.stgit@gara \
--to=jrs@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox