On Wed, Nov 23, Olaf Hering wrote: > > > + if (!blk_split_discard(ioreq, req->sector_number, req->nr_sectors)) { > > > + goto err; > > How is error handling supposed to work here? In the guest the cmd is stuck, instead of getting an IO error: [ 91.966404] mkfs.ext4 D 0000000000000000 0 2878 2831 0x00000000 [ 91.966406] ffff88002204bc48 ffff880030530480 ffff88002fae5800 ffff88002204c000 [ 91.966407] 0000000000000000 7fffffffffffffff 0000000000008000 00000000024000c0 [ 91.966409] ffff88002204bc60 ffffffff815dd985 ffff880038815c00 ffff88002204bd08 [ 91.966409] Call Trace: [ 91.966413] [] schedule+0x35/0x80 [ 91.966416] [] schedule_timeout+0x237/0x2d0 [ 91.966419] [] io_schedule_timeout+0xa6/0x110 [ 91.966421] [] wait_for_completion_io+0xa3/0x110 [ 91.966425] [] submit_bio_wait+0x50/0x60 [ 91.966430] [] blkdev_issue_discard+0x78/0xb0 [ 91.966433] [] blk_ioctl_discard+0x7b/0xa0 [ 91.966436] [] blkdev_ioctl+0x730/0x920 [ 91.966440] [] block_ioctl+0x3d/0x40 [ 91.966444] [] do_vfs_ioctl+0x2cd/0x4a0 [ 91.966453] [] SyS_ioctl+0x74/0x80 [ 91.966456] [] entry_SYSCALL_64_fastpath+0x12/0x6d Olaf