]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Add 64-bit IO manager operations to struct_io_manager.
authorJose R. Santos <jrs@us.ibm.com>
Mon, 3 Mar 2008 16:41:18 +0000 (10:41 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Mar 2008 17:46:44 +0000 (13:46 -0400)
In order to provide 64-bit block support for IO managers an maintain
ABI compatibility with the old API, some new functions need to be
added to struct_io_manger.  Luckily, strcut_io_manager has some
reserved space that we can use to add these new functions.

Signed-off-by: Jose R. Santos <jrs@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/ext2_io.h

index bee75a6a7730d1c80baf98418c6d4fc3e24deb65..c2360954381a67dbbf44395b0efcf24a5602e1b7 100644 (file)
@@ -79,7 +79,11 @@ struct struct_io_manager {
        errcode_t (*set_option)(io_channel channel, const char *option, 
                                const char *arg);
        errcode_t (*get_stats)(io_channel channel, io_stats *io_stats);
-       int             reserved[14];
+       errcode_t (*read_blk64)(io_channel channel, unsigned long long block,
+                                       int count, void *data);
+       errcode_t (*write_blk64)(io_channel channel, unsigned long long block,
+                                       int count, const void *data);
+       int             reserved[16];
 };
 
 #define IO_FLAG_RW             0x0001
@@ -91,7 +95,9 @@ struct struct_io_manager {
 #define io_channel_close(c)            ((c)->manager->close((c)))
 #define io_channel_set_blksize(c,s)    ((c)->manager->set_blksize((c),s))
 #define io_channel_read_blk(c,b,n,d)   ((c)->manager->read_blk((c),b,n,d))
+#define io_channel_read_blk64(c,b,n,d) ((c)->manager->read_blk64((c),b,n,d))
 #define io_channel_write_blk(c,b,n,d)  ((c)->manager->write_blk((c),b,n,d))
+#define io_channel_write_blk64(c,b,n,d) ((c)->manager->write_blk64((c),b,n,d))
 #define io_channel_flush(c)            ((c)->manager->flush((c)))
 #define io_channel_bumpcount(c)                ((c)->refcount++)