Re: refactor the iomap writeback code v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/06/2025 08:02, Christoph Hellwig wrote:
> On Thu, Jun 26, 2025 at 03:59:54PM +0100, Andrew Price wrote:
>>> This version passes basic testing on xfs, and gets as far as mainline
>>> for gfs2 (crashes in generic/361).
>>
>> I can't get generic/361 to crash per se, but it does fail as it detects the new warning about the missing ->migrate_folio for the gfs2_{rgrp,meta}_aops, which I'm looking at now.
>>
>> If you have different results to this, please let me know more about the crash and your test environment.
> 
> This is qemu on two virtio_blk devices, 512 byte sector size and the
> followin mkfs option:
> 
> export MKFS_OPTIONS="-O -p lock_nolock"
> 
> 
> generic/361 2s ... [  627.703731] run fstests generic/361 at 2025-06-27 03:28:28
<snip>
> [  629.110524] Buffer I/O error on dev loop0, logical block 20279, lost async page write
> [  629.111725] gfs2: fsid=loop0.0: fatal: I/O error - block = 16708, function = gfs2_ail1_empty_one8

I suspect the reason I'm not seeing this oops is that when the test injects the I/O error, it's always occurring during gfs2_ail1_start_one() for me, instead of gfs2_ail1_empty_one(). That suggests there's some jd_log_bio cleanup missing from the error path from gfs2_ail1_empty_one(), which is present (or unnecessary) in the gfs2_ail1_start_one() case.

So that's a good lead. Hopefully I can find a way to make the test fail for me at the same point or spot what's missing from the error path.

Andy

<snip>
> [  634.259070] ------------[ cut here ]------------
> [  634.259369] kernel BUG at fs/gfs2/super.c:76!
> [  634.262243] Oops: invalid opcode: 0000 [#1] SMP NOPTI
> [  634.263386] CPU: 0 UID: 0 PID: 148595 Comm: umount Tainted: G N  6.16.0-rc3+ #37 
> [  634.263832] Tainted: [N]=TEST
> [  634.263956] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04
> [  634.264332] RIP: 0010:gfs2_jindex_free+0x13e/0x170
> [  634.264647] Code: 08 e8 56 42 98 ff 48 c7 43 48 00 00 00 00 48 89 df e8 c6 38 90 ff 48 8b 04 24 b
> [  634.265562] RSP: 0018:ffffc90004ba3df8 EFLAGS: 00010286
> [  634.265805] RAX: ffff88811a3f41c0 RBX: ffff88811a3f41c0 RCX: 0000000000000000
> [  634.266141] RDX: 0000000000000001 RSI: ffff88810425c610 RDI: 00000000ffffffff
> [  634.266454] RBP: ffffc90004ba3df8 R08: ffff8881364f7638 R09: ffff8881364f75e8
> [  634.266732] R10: 0000000000000000 R11: ffff8881364f7508 R12: dead000000000122
> [  634.267009] R13: dead000000000100 R14: ffff88810425c620 R15: 0000000000000000
> [  634.267285] FS:  00007f3f53e6d840(0000) GS:ffff8882b35d7000(0000) knlGS:0000000000000000
> [  634.267622] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  634.267856] CR2: 00005625aaa38cc0 CR3: 00000001047e6006 CR4: 0000000000772ef0
> [  634.268128] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [  634.268405] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
> [  634.268685] PKRU: 55555554
> [  634.268805] Call Trace:
> [  634.268913]  <TASK>
> [  634.269002]  gfs2_put_super+0x165/0x230
> [  634.269157]  generic_shutdown_super+0x79/0x180
> [  634.269334]  kill_block_super+0x15/0x40
> [  634.269578]  deactivate_locked_super+0x2b/0xb0
> [  634.269788]  cleanup_mnt+0xb5/0x150
> [  634.269954]  task_work_run+0x54/0x80
> [  634.270123]  exit_to_user_mode_loop+0xbc/0xc0
> [  634.270326]  do_syscall_64+0x1bc/0x1e0
> [  634.270503]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
> [  634.270731] RIP: 0033:0x7f3f54099b37
> [  634.270899] Code: cf 92 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 8
> [  634.271717] RSP: 002b:00007ffd63032398 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
> [  634.272052] RAX: 0000000000000000 RBX: 00005630901e2bb8 RCX: 00007f3f54099b37
> [  634.272371] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00005630901e6b60
> [  634.272695] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000073
> [  634.273017] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3f541d4264
> [  634.273342] R13: 00005630901e6b60 R14: 00005630901e2cd0 R15: 00005630901e2aa0
> [  634.273703]  </TASK>
> [  634.273809] Modules linked in: kvm_intel kvm irqbypass [last unloaded: scsi_debug]
> [  634.274259] ---[ end trace 0000000000000000 ]---
> [  634.274460] RIP: 0010:gfs2_jindex_free+0x13e/0x170
> [  634.274753] Code: 08 e8 56 42 98 ff 48 c7 43 48 00 00 00 00 48 89 df e8 c6 38 90 ff 48 8b 04 24 b
> [  634.275604] RSP: 0018:ffffc90004ba3df8 EFLAGS: 00010286
> [  634.275857] RAX: ffff88811a3f41c0 RBX: ffff88811a3f41c0 RCX: 0000000000000000
> [  634.276230] RDX: 0000000000000001 RSI: ffff88810425c610 RDI: 00000000ffffffff
> [  634.276549] RBP: ffffc90004ba3df8 R08: ffff8881364f7638 R09: ffff8881364f75e8
> [  634.276896] R10: 0000000000000000 R11: ffff8881364f7508 R12: dead000000000122
> [  634.277208] R13: dead000000000100 R14: ffff88810425c620 R15: 0000000000000000
> [  634.277549] FS:  00007f3f53e6d840(0000) GS:ffff8882b35d7000(0000) knlGS:0000000000000000
> [  634.277948] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  634.278201] CR2: 00005625aaa38cc0 CR3: 00000001047e6006 CR4: 0000000000772ef0
> [  634.278513] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [  634.278819] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400
> [  634.279127] PKRU: 55555554
> 





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux