aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fs/ext4/ext4.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 8f6bfa25fa6f..81cb16b5f8da 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2239,6 +2239,7 @@ enum {
EXT4_FLAGS_RESIZING, /* Avoid superblock update and resize race */
EXT4_FLAGS_SHUTDOWN, /* Prevent access to the file system */
EXT4_FLAGS_BDEV_IS_DAX, /* Current block device support DAX */
+ EXT4_FLAGS_EMERGENCY_RO,/* Emergency read-only due to fs errors */
};
static inline int ext4_forced_shutdown(struct super_block *sb)
@@ -2246,6 +2247,11 @@ static inline int ext4_forced_shutdown(struct super_block *sb)
return test_bit(EXT4_FLAGS_SHUTDOWN, &EXT4_SB(sb)->s_ext4_flags);
}
+static inline int ext4_emergency_ro(struct super_block *sb)
+{
+ return test_bit(EXT4_FLAGS_EMERGENCY_RO, &EXT4_SB(sb)->s_ext4_flags);
+}
+
/*
* Default values for user and/or group using reserved blocks
*/