On 2024-11-06 19:41, Keith Busch wrote:
On Mon, Nov 04, 2024 at 08:39:32AM +0100, Christoph Hellwig wrote:
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 6a15873055b9..c26cb7d3a2e5 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -636,7 +636,7 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
if (head->ids.csi == NVME_CSI_ZNS)
lim.features |= BLK_FEAT_ZONED;
else
- lim.max_zone_append_sectors = 0;
+ lim.max_hw_zone_append_sectors = 0;
I think you need to continue clearing max_zone_append_sectors here. The
initial stack limits sets max_zone_append_sectors to UINT_MAX, and
blk_validate_zoned_limits() wants it to be zero.
This appears to be the case. I hit this on a 32-bit x86 machine.
Clearing max_zone_append_sectors here as well resolves the issue for me.
Regards,
Klara Modin
WARNING: CPU: 0 PID: 21 at block/blk-settings.c:75 blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
CPU: 0 UID: 0 PID: 21 Comm: kworker/u4:3 Not tainted 6.12.0-rc6-next-20241106-pentium-mid-00030-gd9dcafd90d18 #17
Workqueue: async async_run_entry_fn
EIP: blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
Code: e9 a8 fd ff ff 83 bb 90 00 00 00 00 74 07 0f 0b e9 98 fd ff ff 83 7b 60 00 74 07 0f 0b e9 8b fd ff ff 31 c0 83 7b 54 00 74 0e <0f> 0b e9 7c fd ff ff 0f 0b e9 75 fd ff ff 8d 65 f4 5b 5e 5f 5d c3
All code
========
0: e9 a8 fd ff ff jmp 0xfffffffffffffdad
5: 83 bb 90 00 00 00 00 cmpl $0x0,0x90(%rbx)
c: 74 07 je 0x15
e: 0f 0b ud2
10: e9 98 fd ff ff jmp 0xfffffffffffffdad
15: 83 7b 60 00 cmpl $0x0,0x60(%rbx)
19: 74 07 je 0x22
1b: 0f 0b ud2
1d: e9 8b fd ff ff jmp 0xfffffffffffffdad
22: 31 c0 xor %eax,%eax
24: 83 7b 54 00 cmpl $0x0,0x54(%rbx)
28: 74 0e je 0x38
2a:* 0f 0b ud2 <-- trapping instruction
2c: e9 7c fd ff ff jmp 0xfffffffffffffdad
31: 0f 0b ud2
33: e9 75 fd ff ff jmp 0xfffffffffffffdad
38: 8d 65 f4 lea -0xc(%rbp),%esp
3b: 5b pop %rbx
3c: 5e pop %rsi
3d: 5f pop %rdi
3e: 5d pop %rbp
3f: c3 ret
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: e9 7c fd ff ff jmp 0xfffffffffffffd83
7: 0f 0b ud2
9: e9 75 fd ff ff jmp 0xfffffffffffffd83
e: 8d 65 f4 lea -0xc(%rbp),%esp
11: 5b pop %rbx
12: 5e pop %rsi
13: 5f pop %rdi
14: 5d pop %rbp
15: c3 ret
EAX: 00000000 EBX: c11a7d3c ECX: 00000200 EDX: 00000000
ESI: ffffffff EDI: ffffffff EBP: c11a7c58 ESP: c11a7c40
DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068 EFLAGS: 00010286
CR0: 80050033 CR2: bffd9c6c CR3: 055a7000 CR4: 00000010
Call Trace:
? show_regs (arch/x86/kernel/dumpstack.c:479 arch/x86/kernel/dumpstack.c:465)
? blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
? __warn (kernel/panic.c:748)
? report_bug (lib/bug.c:201 lib/bug.c:219)
? __bio_advance (block/bio.c:1419)
? blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
? exc_overflow (arch/x86/kernel/traps.c:301)
? handle_bug (arch/x86/kernel/traps.c:285)
? exc_invalid_op (arch/x86/kernel/traps.c:309 (discriminator 1))
? handle_exception (arch/x86/entry/entry_32.S:1055)
? exc_overflow (arch/x86/kernel/traps.c:301)
? blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
? exc_overflow (arch/x86/kernel/traps.c:301)
? blk_validate_limits (block/blk-settings.c:75 (discriminator 1) block/blk-settings.c:366 (discriminator 1))
? __kmalloc_cache_noprof (mm/slub.c:4105 mm/slub.c:4153 mm/slub.c:4309)
blk_set_default_limits (block/blk-settings.c:383)
blk_alloc_queue (block/blk-core.c:417)
__blk_alloc_disk (block/genhd.c:1431 (discriminator 4))
nvme_mpath_alloc_disk (drivers/nvme/host/multipath.c:641 (discriminator 1))
nvme_alloc_ns (drivers/nvme/host/core.c:3650 drivers/nvme/host/core.c:3751 drivers/nvme/host/core.c:3857)
nvme_scan_ns (drivers/nvme/host/core.c:4058)
nvme_scan_ns_async (drivers/nvme/host/core.c:4087)
async_run_entry_fn (arch/x86/include/asm/irqflags.h:26 arch/x86/include/asm/irqflags.h:87 arch/x86/include/asm/irqflags.h:123 kernel/async.c:136)
process_scheduled_works (kernel/workqueue.c:3235 kernel/workqueue.c:3310)
worker_thread (include/linux/list.h:373 (discriminator 2) kernel/workqueue.c:946 (discriminator 2) kernel/workqueue.c:3392 (discriminator 2))
kthread (kernel/kthread.c:391)
? rescuer_thread (kernel/workqueue.c:3337)
? kthread_park (kernel/kthread.c:342)
ret_from_fork (arch/x86/kernel/process.c:153)
? kthread_park (kernel/kthread.c:342)
ret_from_fork_asm (arch/x86/entry/entry_32.S:737)
entry_INT80_32 (arch/x86/entry/entry_32.S:945)