From 3154e1cceb9f49bd3898e9a91723141af55cdd36 Mon Sep 17 00:00:00 2001 From: "Jose R. Santos" Date: Mon, 3 Mar 2008 10:41:18 -0600 Subject: [PATCH] Add 64-bit IO manager operations to struct_io_manager. 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 Signed-off-by: "Theodore Ts'o" --- lib/ext2fs/ext2_io.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/ext2_io.h b/lib/ext2fs/ext2_io.h index bee75a6a..c2360954 100644 --- a/lib/ext2fs/ext2_io.h +++ b/lib/ext2fs/ext2_io.h @@ -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++) -- 2.11.0