Re: [PATCH] ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback
From: Theodore Ts'o
Date: Thu Jun 04 2026 - 10:56:50 EST
On Fri, 24 Apr 2026 18:42:01 +0800, Zhang Yi wrote:
> In EXT4_GOING_FLAGS_LOGFLUSH mode, the EXT4_FLAGS_SHUTDOWN flag was set
> before calling ext4_force_commit(). This caused ordered-mode data
> writeback (triggered by journal commit) to fail with -EIO, since
> ext4_do_writepages() checks for the shutdown flag. The journal would
> then be aborted prematurely before the commit could succeed.
>
> Fix this by calling ext4_force_commit() first, then setting the
> shutdown flag, so that pending data can be written back correctly.
>
> [...]
Applied, thanks!
[1/1] ext4: fix LOGFLUSH shutdown ordering to allow ordered-mode data writeback
commit: d99748ef1695ce17eaf51c64b7a06952fa7cddab
Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>