Re: first bad commit: [5795eb443060148796beeba106e4366d7f1458a6] scsi: sd_zbc: emulate ZONE_APPEND commands

From: Borislav Petkov
Date: Fri Sep 11 2020 - 19:07:17 EST


On Sat, Sep 12, 2020 at 12:17:59AM +0200, Borislav Petkov wrote:
> Enabling it, fixes the issue.

Btw, I just hit the below warn with 5.8, while booting with the above
config option enabled. Looks familiar and I didn't trigger it with
5.9-rc4+ so you guys either fixed it or something changed in-between:

[ 5.124321] ata4.00: NCQ Send/Recv Log not supported
[ 5.131484] ata4.00: configured for UDMA/133
[ 5.135847] scsi 3:0:0:0: Direct-Access ATA ST8000AS0022-1WL SN01 PQ: 0 ANSI: 5
[ 5.143972] sd 3:0:0:0: Attached scsi generic sg1 type 0
[ 5.144033] sd 3:0:0:0: [sdb] Host-aware zoned block device
[ 5.177105] sd 3:0:0:0: [sdb] 15628053168 512-byte logical blocks: (8.00 TB/7.28 TiB)
[ 5.184880] sd 3:0:0:0: [sdb] 4096-byte physical blocks
[ 5.190084] sd 3:0:0:0: [sdb] 29808 zones of 524288 logical blocks + 1 runt zone
[ 5.197439] sd 3:0:0:0: [sdb] Write Protect is off
[ 5.202220] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 5.207260] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5.356631] sdb: sdb1
[ 5.359014] sdb: disabling host aware zoned block device support due to partitions
[ 5.389941] ------------[ cut here ]------------
[ 5.394557] WARNING: CPU: 8 PID: 164 at block/blk-settings.c:236 blk_queue_max_zone_append_sectors+0x12/0x40
[ 5.404300] Modules linked in:
[ 5.407365] CPU: 8 PID: 164 Comm: kworker/u32:6 Not tainted 5.8.0 #7
[ 5.413682] Hardware name: Micro-Star International Co., Ltd. MS-7B79/X470 GAMING PRO (MS-7B79), BIOS 1.70 01/23/2019
[ 5.424191] Workqueue: events_unbound async_run_entry_fn
[ 5.429482] RIP: 0010:blk_queue_max_zone_append_sectors+0x12/0x40
[ 5.435543] Code: fe 0f 00 00 53 48 89 fb 0f 86 3d 07 00 00 48 89 b3 e0 03 00 00 5b c3 90 0f 1f 44 00 00 8b 87 40 04 00 00 ff c8 83 f8 01 76 03 <0f> 0b c3 8b 87 f8 03 00 00 39 87 f0 03 00 00 0f 46 87 f0 03 00 00
[ 5.454099] RSP: 0018:ffffc90000697c60 EFLAGS: 00010282
[ 5.459306] RAX: 00000000ffffffff RBX: ffff8887fa0a9400 RCX: 0000000000000000
[ 5.466390] RDX: ffff8887faf0d400 RSI: 0000000000000540 RDI: ffff8887f0dde6c8
[ 5.473474] RBP: 0000000000007471 R08: 00000000001d1c40 R09: ffff8887fee29ad0
[ 5.480559] R10: 00000001434bac00 R11: 0000000000358275 R12: 0000000000080000
[ 5.487643] R13: ffff8887f0dde6c8 R14: ffff8887fa0a9738 R15: 0000000000000000
[ 5.494726] FS: 0000000000000000(0000) GS:ffff8887fee00000(0000) knlGS:0000000000000000
[ 5.502757] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5.508474] CR2: 0000000000000000 CR3: 0000000002209000 CR4: 00000000003406e0
[ 5.515558] Call Trace:
[ 5.518026] sd_zbc_read_zones+0x323/0x480
[ 5.522122] sd_revalidate_disk+0x122b/0x2000
[ 5.526472] ? __device_add_disk+0x2f7/0x4e0
[ 5.530738] sd_probe+0x347/0x44b
[ 5.534058] really_probe+0x2c4/0x3f0
[ 5.537720] driver_probe_device+0xe1/0x150
[ 5.541902] ? driver_allows_async_probing+0x50/0x50
[ 5.546852] bus_for_each_drv+0x6a/0xa0
[ 5.550683] __device_attach_async_helper+0x8c/0xd0
[ 5.555547] async_run_entry_fn+0x4a/0x180
[ 5.559636] process_one_work+0x1a5/0x3a0
[ 5.563637] worker_thread+0x50/0x3a0
[ 5.567300] ? process_one_work+0x3a0/0x3a0
[ 5.571480] kthread+0x117/0x160
[ 5.574715] ? kthread_park+0x90/0x90
[ 5.578377] ret_from_fork+0x22/0x30
[ 5.581960] ---[ end trace 94141003236730cf ]---
[ 5.586578] sd 3:0:0:0: [sdb] Attached SCSI disk
[ 6.186783] ata5: failed to resume link (SControl 0)
[ 6.191818] ata5: SATA link down (SStatus 0 SControl 0)

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette