]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect
authorAnnie Li <annie.li@oracle.com>
Wed, 26 Jul 2017 14:38:02 +0000 (10:38 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 27 Jul 2017 20:49:21 +0000 (13:49 -0700)
commit8709f2f7f854b7b330858fa00ebf6b758e98fbb7
treefe633647c7d79c8ea3181ec49fbfac0f9c26d009
parent74d5ebd39bfa6cece3c49f2d06da1aec3e032204
xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect

If there is inflight I/O in any non-last queue, blkback returns -EBUSY
directly, and never stops thread of remaining queue and processs them. When
removing vbd device with lots of disk I/O load, some queues with inflight
I/O still have blkback thread running even though the corresponding vbd
device or guest is gone.
And this could cause some problems, for example, if the backend device type
is file, some loop devices and blkback thread always lingers there forever
after guest is destroyed, and this causes failure of umounting repositories
unless rebooting the dom0. So stop all threads properly and return -EBUSY
if any queue has inflight I/O.

OraBug: 26539922

Signed-off-by: Annie Li <annie.li@oracle.com>
Reviewed-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Reviewed-by: Bhavesh Davda <bhavesh.davda@oracle.com>
drivers/block/xen-blkback/xenbus.c