summaryrefslogtreecommitdiff
path: root/convert/source-ext2.h
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 14:32:01 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2018-07-23 14:32:01 +0100
commit3b9cf4c8cda0818e4d3f9892ece9f7d99de13b03 (patch)
tree59446f505b5bb3b31b1b3bb81af997dda68407c2 /convert/source-ext2.h
parentf22f0302575d3a167ee550470c922de82e34342b (diff)
Diffstat (limited to 'convert/source-ext2.h')
-rw-r--r--convert/source-ext2.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/convert/source-ext2.h b/convert/source-ext2.h
index 80833b21..c3214125 100644
--- a/convert/source-ext2.h
+++ b/convert/source-ext2.h
@@ -33,8 +33,18 @@
* BIGALLOC.
* Unlike normal RO compat flag, BIGALLOC affects how e2fsprogs check used
* space, and btrfs-convert heavily relies on it.
+ *
+ * e2fsprogs 1.42 also introduced the 64-bit API. Any file system
+ * that requires it will have EXT4_FEATURE_INCOMPAT_64BIT set and
+ * will fail to open with earlier releases. We can map it to the
+ * older API without risk of corruption.
*/
-#ifdef HAVE_OLD_E2FSPROGS
+#ifndef EXT2_FLAG_64BITS
+#define EXT2_FLAG_64BITS (0)
+#define ext2fs_get_block_bitmap_range2 ext2fs_get_block_bitmap_range
+#define ext2fs_inode_data_blocks2 ext2fs_inode_data_blocks
+#define ext2fs_read_ext_attr2 ext2fs_read_ext_attr
+#define ext2fs_blocks_count(s) ((s)->s_blocks_count)
#define EXT2FS_CLUSTER_RATIO(fs) (1)
#define EXT2_CLUSTERS_PER_GROUP(s) (EXT2_BLOCKS_PER_GROUP(s))
#define EXT2FS_B2C(fs, blk) (blk)