RE: [PATCH v5] virtio_blk: Fix disk deletion hang on device surprise removal
From: Parav Pandit <hidden>
Date: 2025-06-18 09:29:52
Also in:
linux-block, stable
Hi Michael, Stefan,
From: Parav Pandit <redacted>
Sent: 02 June 2025 08:15 AM
To: mst@redhat.com; stefanha@redhat.com; axboe@kernel.dk;
virtualization@lists.linux.dev; linux-block@vger.kernel.org
Cc: stable@vger.kernel.org; NBU-Contact-Li Rongqing (EXTERNAL)
[off-list ref]; Chaitanya Kulkarni [off-list ref];
xuanzhuo@linux.alibaba.com; pbonzini@redhat.com;
jasowang@redhat.com; alok.a.tiwari@oracle.com; Parav Pandit
[off-list ref]; Max Gurtovoy [off-list ref]; Israel
Rukshin [off-list ref]
Subject: [PATCH v5] virtio_blk: Fix disk deletion hang on device surprise
removal
When the PCI device is surprise removed, requests may not complete the
device as the VQ is marked as broken. Due to this, the disk deletion hangs.
Fix it by aborting the requests when the VQ is broken.
With this fix now fio completes swiftly.
An alternative of IO timeout has been considered, however when the driver
knows about unresponsive block device, swiftly clearing them enables users
and upper layers to react quickly.
Verified with multiple device unplug iterations with pending requests in virtio
used ring and some pending with the device.
Fixes: 43bb40c5b926 ("virtio_pci: Support surprise removal of virtio pci
device")
Cc: stable@vger.kernel.org
Reported-by: Li RongQing <redacted>
Closes:
https://lore.kernel.org/virtualization/c45dd68698cd47238c55fb73ca9b4741
@baidu.com/
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Israel Rukshin <redacted>
Signed-off-by: Parav Pandit <redacted>
---
v4->v5:
- fixed comment style where comment to start with one empty line at start
- Addressed comments from Alok
- fixed typo in broken vq checkDid you get a chance to review this version where I fixed all the comments you proposed? [..]