2023-03-23 15:07:12

by Jan Kara

[permalink] [raw]
Subject: [PATCH 0/2] ext4: Fix two bugs in journalled writepages rework

Hello!

These two patches fix two problems introduced by the rewrite of journalled
writeback path.

Honza


2023-03-23 15:07:22

by Jan Kara

[permalink] [raw]
Subject: [PATCH 1/2] ext4: Fix data=journal writeback of DMA pinned page

The condition in ext4_writepages() checking whether the filesystem is
frozen had a brown paper bag bug resulting in us never writing back
DMA pinned pages. Fix the condition.

Reported-by: Eric Biggers <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Fixes: 18b7f4107219 ("ext4: Fix warnings when freezing filesystem with journaled data")
Signed-off-by: Jan Kara <[email protected]>
---
fs/ext4/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3e311c85df08..15bac8181798 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2436,7 +2436,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
* loop clears them.
*/
if (ext4_should_journal_data(mpd->inode) &&
- sb->s_writers.frozen >= SB_FREEZE_FS) {
+ sb->s_writers.frozen < SB_FREEZE_FS) {
handle = ext4_journal_start(mpd->inode, EXT4_HT_WRITE_PAGE,
bpp);
if (IS_ERR(handle))
--
2.35.3

2023-04-15 02:21:24

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH 0/2] ext4: Fix two bugs in journalled writepages rework

On Thu, Mar 23, 2023 at 03:53:57PM +0100, Jan Kara wrote:
> Hello!
>
> These two patches fix two problems introduced by the rewrite of journalled
> writeback path.

I've folded these patches into the "ext4: Covert data=journal
writeback to use ext4_writepages()" commit in my tree. Thanks,

- Ted