[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1077838] Re: qemu-nbd -r -c taints device for subseque
From: |
T. Huth |
Subject: |
[Qemu-devel] [Bug 1077838] Re: qemu-nbd -r -c taints device for subsequent usage, even after -d |
Date: |
Tue, 19 Jul 2016 08:00:27 -0000 |
According to comment #9 this bug has been fixed by this commit here:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c8969eded252058
... so I think it should be OK to close this bug now.
** Changed in: qemu
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1077838
Title:
qemu-nbd -r -c taints device for subsequent usage, even after -d
Status in QEMU:
Fix Released
Status in qemu-kvm package in Ubuntu:
Fix Released
Status in qemu-kvm source package in Precise:
Fix Released
Status in qemu-kvm source package in Quantal:
Fix Released
Bug description:
Something about qemu-nbd -r -c /dev/nbd0 someimg leaves cruft behind -
subsequent connections get marked readonly.
This is on quantal, haven't checked precise or raring.
To demonstrate:
# use one image
qemu-img create -f qcow2 /tmp/1.qcow2 100M
sudo qemu-nbd -c /dev/nbd2 /tmp/1.qcow2
sudo mkfs -t ext4 /dev/nbd2
sudo qemu-nbd -d /dev/nbd2
# use a second one on the same nbd device, shows that reuse works:
qemu-img create -f qcow2 /tmp/2.qcow2 100M
sudo qemu-nbd -c /dev/nbd2 /tmp/2.qcow2
sudo mkfs -t ext4 /dev/nbd2
sudo qemu-nbd -d /dev/nbd2
# connect an image in read only mode
sudo qemu-nbd -r -c /dev/nbd2 /tmp/2.qcow2
sudo dumpe2fs /dev/nbd2 | head -n 3
sudo qemu-nbd -d /dev/nbd2
# now try to reuse in read-write mode again:
qemu-img create -f qcow2 /tmp/3.qcow2 100M
sudo qemu-nbd -c /dev/nbd2 /tmp/3.qcow2
sudo mkfs -t ext4 /dev/nbd2
# here it goes boom:
mke2fs 1.42.5 (29-Jul-2012)
/dev/nbd2: Operation not permitted while setting up superblock
# still need to cleanup
sudo qemu-nbd -d /dev/nbd2
===============================
SRU Justification:
1. Impact: mounting an nbd device as read-write after doing so read-only
will cause the mount to erroneously (and quietly) be read-only.
2. Development fix: have qemu-nbd set the device to read-write when asked,
rather than only setting read-only.
3. Stable fix: same as development fix
4. Test case: See above
5. Regression potential: The patch is localized to the handling of read-only
flag in qemu-nbd, so any regression should not affect anything else.
===============================
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1077838/+subscriptions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [Bug 1077838] Re: qemu-nbd -r -c taints device for subsequent usage, even after -d,
T. Huth <=