From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIOjc-0001B1-Nc for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:40:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIOjY-0003N1-TM for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:40:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIOjY-0003Ml-Ba for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:40:40 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t12LedsZ022580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 2 Feb 2015 16:40:39 -0500 From: Max Reitz Date: Mon, 2 Feb 2015 16:40:35 -0500 Message-Id: <1422913238-7280-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] nbd: Drop BDS backpointer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Stefan Hajnoczi , Max Reitz Right now, bdrv_swap() on NBD BDSs results in a segmentation fault pretty much all of the time. This series fixes this. Note that this is not a common case, as bdrv_swap() is generally only performed on root BDSs (there are exceptions, though) and NBD BDSs normally have a format BDS above them. However, due to misconfiguration (or maybe it is not even a misconfiguration, but just a strange configuration) these cases may indeed occur. For the iotest to succeed, this series relies on "iotests: Specify format for qemu-nbd". I took the second patch in this series from my other series "block: Rework bdrv_close_all()" (which has 21 patches itself and depends on 64 other patches, so making this series rely on that one probably would not have been a very good idea). Max Reitz (3): nbd: Drop BDS backpointer iotests: Add "wait" functionality to _cleanup_qemu iotests: Add test for drive-mirror with NBD target block/nbd-client.c | 95 ++++++++++++++++++++++-------------------- block/nbd-client.h | 20 ++++----- block/nbd.c | 37 +++++++--------- tests/qemu-iotests/094 | 81 +++++++++++++++++++++++++++++++++++ tests/qemu-iotests/094.out | 11 +++++ tests/qemu-iotests/common.qemu | 12 +++++- tests/qemu-iotests/group | 1 + 7 files changed, 177 insertions(+), 80 deletions(-) create mode 100755 tests/qemu-iotests/094 create mode 100644 tests/qemu-iotests/094.out -- 2.1.0