Re: [PATCH 9/9] ext4: Remove ordered data support from ext4_writepage()

Jan Kara
2022-12-01T14:12:03Z

On Thu 01-12-22 19:06:19, Ritesh Harjani (IBM) wrote:
> On 22/12/01 04:51PM, Ritesh Harjani (IBM) wrote:
> > On 22/11/30 05:36PM, Jan Kara wrote:
> > > - ext4_io_submit_init(&io_submit, wbc);
> > > - io_submit.io_end = ext4_init_io_end(inode, GFP_NOFS);
> > > - if (!io_submit.io_end) {
> > > - redirty_page_for_writepage(wbc, page);
> > > + WARN_ON_ONCE(!ext4_should_journal_data(inode));
>
> Oh and one more thing, this will give a WARN_ON_ONCE(), until we change the pageout()
> function from reclaim path to not call ->writepage() method.
> This until then might cause random fstest to fail for sometime if it observes a
> kernel warning message while the test was running.
>
> [ 5081.820019] WARNING: CPU: 3 PID: 125 at fs/ext4/inode.c:1994 ext4_writepage+0x380/0xb80
> [ 5081.822884] Modules linked in:
> [ 5081.824487] CPU: 3 PID: 125 Comm: kswapd0 Not tainted 6.1.0-rc4-00054-g969d94a2d4d6 #101
> [ 5081.825559] Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1200 0xf000005 of:SLOF,git-6b6c16 pSeries
> [ 5081.826743] NIP: c00000000077a2c0 LR: c00000000077a2b4 CTR: c000000000779f40
> [ 5081.827547] REGS: c0000000073d72d0 TRAP: 0700 Not tainted (6.1.0-rc4-00054-g969d94a2d4d6)
> <...>
> [ 5081.862838] NIP [c00000000077a2c0] ext4_writepage+0x380/0xb80
> [ 5081.864963] LR [c00000000077a2b4] ext4_writepage+0x374/0xb80
> [ 5081.865995] Call Trace:
> [ 5081.866510] ext4_writepage+0x190/0xb80 (unreliable)
> [ 5081.867438] pageout+0x1b0/0x550
> [ 5081.868110] shrink_folio_list+0xb48/0x1400
> [ 5081.868803] shrink_inactive_list+0x2ec/0x6b0
> [ 5081.869504] shrink_lruvec+0x6f0/0x7b0
> [ 5081.870160] shrink_node+0x5e4/0x980
> [ 5081.870801] balance_pgdat+0x4cc/0x910
> [ 5081.871453] kswapd+0x6e4/0x820
> [ 5081.872062] kthread+0x168/0x170
> [ 5081.872691] ret_from_kernel_thread+0x5c/0x64

Hum, right. It didn't trigger for me :). I'll see how to fix this.

Honza

--
Jan Kara <jack@suse.com>
SUSE Labs, CR