Skip to content

filesystem: support ext4 super block emergency_ro flag#3717

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
yadutaf:ext4-emergency-ro
Jul 9, 2026
Merged

filesystem: support ext4 super block emergency_ro flag#3717
SuperQ merged 1 commit into
prometheus:masterfrom
yadutaf:ext4-emergency-ro

Conversation

@yadutaf

@yadutaf yadutaf commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Since Linux 6.15, the ext4 superblock exposes the 'emergency_ro' flag when 'errors=remount-ro' has been triggered. The 'ro' flag is no longer set on the super block in this case since Linux 6.12.

reference:

This commit will allow reporting an ext4 filesystem as read-only, for Linux 6.15+. Hosts with a version between 6.12 and 6.15 or with a backport of the 6.12 fix will still report an 'emergency_ro' filesystem as read-write.

This was tested manually with a 6.18.x Kernel using a 'flakey' device mapper overlay for fault injection.

Since Linux 6.15, the ext4 superblock exposes the 'emergency_ro' flag
when 'errors=remount-ro' has been triggered. The 'ro' flag is no longer
set on the super block in this case since Linux 6.12.

reference:
- torvalds/linux@6b76715d5e41f
- torvalds/linux@d3476f3dad4ad

This commit will allow reporting an ext4 filesystem as read-only,
for Linux 6.15+. Hosts with a version between 6.12 and 6.15 or with a
backport of the 6.12 fix will still report an 'emergency_ro' filesystem
as read-write.

This was tested manually with a 6.18.x Kernel using a 'flakey' device
mapper overlay for fault injection.

Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.lebigot@exoscale.ch>
@yadutaf yadutaf force-pushed the ext4-emergency-ro branch from bcd3cd8 to 760b148 Compare July 8, 2026 08:41
@yadutaf

yadutaf commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@SuperQ, @discordianfish Could you have a look? Thanks!

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice, thanks!

@SuperQ

SuperQ commented Jul 9, 2026

Copy link
Copy Markdown
Member

Thanks for the kernel source references, it helps.

@SuperQ SuperQ merged commit 512951b into prometheus:master Jul 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants