summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2fs.h
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-08-12 21:34:48 +0000
committerpfg <pfg@FreeBSD.org>2013-08-12 21:34:48 +0000
commit0b111bdfcbe8e9c5f1d30ef4226b1250231c8716 (patch)
treee860424fb0197712306853c548b2f4f68cda88d8 /sys/fs/ext2fs/ext2fs.h
parent3eef1145fb2dc3eb7434ad247e8dd4f79a183cd0 (diff)
downloadFreeBSD-src-0b111bdfcbe8e9c5f1d30ef4226b1250231c8716.zip
FreeBSD-src-0b111bdfcbe8e9c5f1d30ef4226b1250231c8716.tar.gz
Add read-only support for extents in ext2fs.
Basic support for extents was implemented by Zheng Liu as part of his Google Summer of Code in 2010. This support is read-only at this time. In addition to extents we also support the huge_file extension for read-only purposes. This works nicely with the additional support for birthtime/nanosec timestamps and dir_index that have been added lately. The implementation may not work for all ext4 filesystems as it doesn't support some features that are being enabled by default on recent linux like flex_bg. Nevertheless, the feature should be very useful for migration or simple access in filesystems that have been converted from ext2/3 or don't use incompatible features. Special thanks to Zheng Liu for his dedication and continued work to support ext2 in FreeBSD. Submitted by: Zheng Liu (lz@) Reviewed by: Mike Ma, Christoph Mallon (previous version) Sponsored by: Google Inc. MFC after: 3 weeks
Diffstat (limited to 'sys/fs/ext2fs/ext2fs.h')
-rw-r--r--sys/fs/ext2fs/ext2fs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2fs.h b/sys/fs/ext2fs/ext2fs.h
index 7b16f0f..b562287 100644
--- a/sys/fs/ext2fs/ext2fs.h
+++ b/sys/fs/ext2fs/ext2fs.h
@@ -201,12 +201,18 @@ struct csum {
* - EXT2F_ROCOMPAT_SPARSESUPER
* - EXT2F_ROCOMPAT_LARGEFILE
* - EXT2F_INCOMPAT_FTYPE
+ *
+ * We partially (read-only) support the following EXT4 features:
+ * - EXT2F_ROCOMPAT_HUGE_FILE
+ * - EXT2F_ROCOMPAT_EXTRA_ISIZE
+ * - EXT2F_INCOMPAT_EXTENTS
*/
#define EXT2F_COMPAT_SUPP 0x0000
#define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \
EXT2F_ROCOMPAT_LARGEFILE | \
EXT2F_ROCOMPAT_EXTRA_ISIZE)
-#define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE
+#define EXT2F_INCOMPAT_SUPP (EXT2F_INCOMPAT_FTYPE | \
+ EXT2F_INCOMPAT_EXTENTS)
/* Assume that user mode programs are passing in an ext2fs superblock, not
* a kernel struct super_block. This will allow us to call the feature-test
OpenPOWER on IntegriCloud