ext4: support read-only images
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 13 Feb 2015 03:31:21 +0000 (22:31 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 13 Feb 2015 03:31:21 +0000 (22:31 -0500)
Add a rocompat feature, "readonly" to mark a FS image as read-only.
The feature prevents the kernel and e2fsprogs from changing the image;
the flag can be toggled by tune2fs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/super.c

index b7f393d..7fec2ef 100644 (file)
@@ -1530,6 +1530,7 @@ static inline void ext4_clear_state_flags(struct ext4_inode_info *ei)
  * GDT_CSUM bits are mutually exclusive.
  */
 #define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM   0x0400
+#define EXT4_FEATURE_RO_COMPAT_READONLY                0x1000
 
 #define EXT4_FEATURE_INCOMPAT_COMPRESSION      0x0001
 #define EXT4_FEATURE_INCOMPAT_FILETYPE         0x0002
diff --cc fs/ext4/super.c
Simple merge