[pbs-devel] [PATCH 0/3] Fix PBS blockdriver for non-VM settings
Stefan Reiter
s.reiter at proxmox.com
Mon Jul 20 17:02:17 CEST 2020
When using the PBS blockdriver with qemu-nbd (for example), it can happen that
enough read requests are issued to saturate the tokio thread pool. Not an issue
in general, but as me and Wolfgang painstakenly discovered a while back, it does
break block_on, which is used in BufferedFixedReader. This means that reading
larger amounts of data would hang the QEMU process [0].
Fix this by making the entire BufferedFixedReader API async, thus not requiring
a block_on.
Additionally I discovered a seperate bug (fixed by patch 3), wherein read
requests that we're not aligned to the chunk size would return bogus data. This
too only seems to happen in non-VM connections (e.g. nbd, etc...).
[0] ...and since the NBD kernel driver appears to be horribly broken, this often
also crashes most of the system, but that's a different story. If you ever get
in this situation, 'nbd-client -d /dev/nbdX' works (sometimes) to force
disconnect the device ('qemu-nbd -d' intelligently issues a read before
disconnecting, thus hanging before getting anything done...)
backup: Stefan Reiter (1):
make BufferedFixedReader async
src/backup/fixed_index.rs | 145 ++++++++++----------------------------
1 file changed, 37 insertions(+), 108 deletions(-)
backup-qemu: Stefan Reiter (1):
use new async BufferedFixedReader API
src/restore.rs | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
qemu: Stefan Reiter (1):
PVE: PBS: iterate read_image_at until all data is available
block/pbs.c | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
--
2.20.1
More information about the pbs-devel
mailing list