]> www.infradead.org Git - users/hch/misc.git/commit
ext4: add EXT4_FLAGS_EMERGENCY_RO bit
authorBaokun Li <libaokun1@huawei.com>
Wed, 22 Jan 2025 11:41:25 +0000 (19:41 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 13 Mar 2025 14:16:34 +0000 (10:16 -0400)
commitf3054e53c2f367bd3cf6535afe9ab13198d2d739
tree59de17d65da4dbf04a25f4c9fdf688d70544fa8f
parent99708f8a9d30081a71638d6f4e216350a4340cc3
ext4: add EXT4_FLAGS_EMERGENCY_RO bit

EXT4_FLAGS_EMERGENCY_RO Indicates that the current file system has become
read-only due to some error. Compared to SB_RDONLY, setting it does not
require a lock because we won't clear it, which avoids over-coupling with
vfs freeze. Also, add a helper function ext4_emergency_ro() to check if
the bit is set.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20250122114130.229709-3-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h