* [Qemu-devel] "block: use aio_bh_schedule_oneshot" breaks ibm-vscsi
@ 2016-10-27 3:30 Alexey Kardashevskiy
2016-10-27 7:57 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Kardashevskiy @ 2016-10-27 3:30 UTC (permalink / raw)
To: qemu-devel
Cc: Alexey Kardashevskiy, qemu-ppc, David Gibson, Kevin Wolf,
Paolo Bonzini, Stefan Hajnoczi
Hi,
I just discovered that fffb6e12233002c26c0ee9ff92fa87927cd779f2 broke
ibm-vscsi, the guest booting stops (I waited for a minute) at:
[ 0.809286] ibmvscsi 71000001: SRP_VERSION: 16.a
[ 0.809766] ibmvscsi 71000001: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3
[ 0.810059] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9
[ 0.810634] ibmvscsi 71000001: partner initialization complete
[ 0.810999] ibmvscsi 71000001: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152
[ 0.811507] ibmvscsi 71000001: sent SRP login
[ 0.811705] ibmvscsi 71000001: SRP_LOGIN succeeded
[ 0.824062] scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 1.018526] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.019352] sd 0:0:0:0: [sda] 67108864 512-byte logical blocks: (34.4 GB/32.0 GiB)
[ 1.020274] sd 0:0:0:0: [sda] Write Protect is off
[ 1.020667] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.023390] sda: sda1 sda2 sda3
[ 1.025819] sd 0:0:0:0: [sda] Attached SCSI disk
When I switch to virtio-vscsi, I get a bit further:
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
fsck.ext4: Read-only file system while trying to open /dev/sda2
Disk write-protected; use the -n option to do a read-only
check of the device.
fsck exited with status code 8
done.
Warning: File system check failed but did not detect errors
and then I get login prompt.
With reverted fffb6e12233002c26c0ee9ff92fa87927cd779f2, virtio-vscsi behaves
the same (so I assume fffb6e122 does not affect it) and ibm-vscsi behaves nicely:
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.27.1
[/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
/dev/sda2: clean, 66846/2011296 files, 574929/8034048 blocks
done.
[ 0.996954] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
done.
and then I get login prompt.
fffb6e12233002c26c0ee9ff92fa87927cd779f2 is:
===
block: use aio_bh_schedule_oneshot
This simplifies bottom half handlers by removing calls to qemu_bh_delete and
thus removing the need to stash the bottom half pointer in the opaque
datum.
===
Any clues what is wrong? Thanks.
---
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] "block: use aio_bh_schedule_oneshot" breaks ibm-vscsi
2016-10-27 3:30 [Qemu-devel] "block: use aio_bh_schedule_oneshot" breaks ibm-vscsi Alexey Kardashevskiy
@ 2016-10-27 7:57 ` Paolo Bonzini
2016-10-27 12:02 ` Alexey Kardashevskiy
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2016-10-27 7:57 UTC (permalink / raw)
To: Alexey Kardashevskiy, qemu-devel
Cc: qemu-ppc, David Gibson, Kevin Wolf, Stefan Hajnoczi
On 27/10/2016 05:30, Alexey Kardashevskiy wrote:
> Hi,
>
> I just discovered that fffb6e12233002c26c0ee9ff92fa87927cd779f2 broke
> ibm-vscsi, the guest booting stops (I waited for a minute) at:
>
> [ 0.809286] ibmvscsi 71000001: SRP_VERSION: 16.a
> [ 0.809766] ibmvscsi 71000001: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3
> [ 0.810059] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9
> [ 0.810634] ibmvscsi 71000001: partner initialization complete
> [ 0.810999] ibmvscsi 71000001: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152
> [ 0.811507] ibmvscsi 71000001: sent SRP login
> [ 0.811705] ibmvscsi 71000001: SRP_LOGIN succeeded
> [ 0.824062] scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
> [ 1.018526] sd 0:0:0:0: Attached scsi generic sg0 type 0
> [ 1.019352] sd 0:0:0:0: [sda] 67108864 512-byte logical blocks: (34.4 GB/32.0 GiB)
> [ 1.020274] sd 0:0:0:0: [sda] Write Protect is off
> [ 1.020667] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [ 1.023390] sda: sda1 sda2 sda3
> [ 1.025819] sd 0:0:0:0: [sda] Attached SCSI disk
>
>
> When I switch to virtio-vscsi, I get a bit further:
>
> Begin: Loading essential drivers ... done.
> Begin: Running /scripts/init-premount ... done.
> Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
> Begin: Running /scripts/local-premount ... done.
> Begin: Will now check root file system ... fsck from util-linux 2.27.1
> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
> fsck.ext4: Read-only file system while trying to open /dev/sda2
> Disk write-protected; use the -n option to do a read-only
> check of the device.
> fsck exited with status code 8
> done.
> Warning: File system check failed but did not detect errors
>
> and then I get login prompt.
>
>
> With reverted fffb6e12233002c26c0ee9ff92fa87927cd779f2, virtio-vscsi behaves
> the same (so I assume fffb6e122 does not affect it) and ibm-vscsi behaves nicely:
>
> Begin: Loading essential drivers ... done.
> Begin: Running /scripts/init-premount ... done.
> Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
> Begin: Running /scripts/local-premount ... done.
> Begin: Will now check root file system ... fsck from util-linux 2.27.1
> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
> /dev/sda2: clean, 66846/2011296 files, 574929/8034048 blocks
> done.
> [ 0.996954] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
> done.
>
> and then I get login prompt.
>
>
> fffb6e12233002c26c0ee9ff92fa87927cd779f2 is:
> ===
> block: use aio_bh_schedule_oneshot
>
> This simplifies bottom half handlers by removing calls to qemu_bh_delete and
> thus removing the need to stash the bottom half pointer in the opaque
> datum.
> ===
>
> Any clues what is wrong? Thanks.
Hi, it turns out that the fix is already included in the 20-patch
series "dataplane: remove RFifoLock". It's in patch 17.
diff --git a/async.c b/async.c
index f30d011..fb37b03 100644
--- a/async.c
+++ b/async.c
@@ -61,6 +61,7 @@ void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
smp_wmb();
ctx->first_bh = bh;
qemu_mutex_unlock(&ctx->bh_lock);
+ aio_notify(ctx);
}
QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
Thanks,
Paolo
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] "block: use aio_bh_schedule_oneshot" breaks ibm-vscsi
2016-10-27 7:57 ` Paolo Bonzini
@ 2016-10-27 12:02 ` Alexey Kardashevskiy
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2016-10-27 12:02 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Cc: qemu-ppc, David Gibson, Kevin Wolf, Stefan Hajnoczi
On 27/10/16 18:57, Paolo Bonzini wrote:
>
>
> On 27/10/2016 05:30, Alexey Kardashevskiy wrote:
>> Hi,
>>
>> I just discovered that fffb6e12233002c26c0ee9ff92fa87927cd779f2 broke
>> ibm-vscsi, the guest booting stops (I waited for a minute) at:
>>
>> [ 0.809286] ibmvscsi 71000001: SRP_VERSION: 16.a
>> [ 0.809766] ibmvscsi 71000001: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3
>> [ 0.810059] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9
>> [ 0.810634] ibmvscsi 71000001: partner initialization complete
>> [ 0.810999] ibmvscsi 71000001: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152
>> [ 0.811507] ibmvscsi 71000001: sent SRP login
>> [ 0.811705] ibmvscsi 71000001: SRP_LOGIN succeeded
>> [ 0.824062] scsi 0:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
>> [ 1.018526] sd 0:0:0:0: Attached scsi generic sg0 type 0
>> [ 1.019352] sd 0:0:0:0: [sda] 67108864 512-byte logical blocks: (34.4 GB/32.0 GiB)
>> [ 1.020274] sd 0:0:0:0: [sda] Write Protect is off
>> [ 1.020667] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
>> [ 1.023390] sda: sda1 sda2 sda3
>> [ 1.025819] sd 0:0:0:0: [sda] Attached SCSI disk
>>
>>
>> When I switch to virtio-vscsi, I get a bit further:
>>
>> Begin: Loading essential drivers ... done.
>> Begin: Running /scripts/init-premount ... done.
>> Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
>> Begin: Running /scripts/local-premount ... done.
>> Begin: Will now check root file system ... fsck from util-linux 2.27.1
>> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
>> fsck.ext4: Read-only file system while trying to open /dev/sda2
>> Disk write-protected; use the -n option to do a read-only
>> check of the device.
>> fsck exited with status code 8
>> done.
>> Warning: File system check failed but did not detect errors
>>
>> and then I get login prompt.
>>
>>
>> With reverted fffb6e12233002c26c0ee9ff92fa87927cd779f2, virtio-vscsi behaves
>> the same (so I assume fffb6e122 does not affect it) and ibm-vscsi behaves nicely:
>>
>> Begin: Loading essential drivers ... done.
>> Begin: Running /scripts/init-premount ... done.
>> Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
>> Begin: Running /scripts/local-premount ... done.
>> Begin: Will now check root file system ... fsck from util-linux 2.27.1
>> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
>> /dev/sda2: clean, 66846/2011296 files, 574929/8034048 blocks
>> done.
>> [ 0.996954] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
>> done.
>>
>> and then I get login prompt.
>>
>>
>> fffb6e12233002c26c0ee9ff92fa87927cd779f2 is:
>> ===
>> block: use aio_bh_schedule_oneshot
>>
>> This simplifies bottom half handlers by removing calls to qemu_bh_delete and
>> thus removing the need to stash the bottom half pointer in the opaque
>> datum.
>> ===
>>
>> Any clues what is wrong? Thanks.
>
> Hi, it turns out that the fix is already included in the 20-patch
> series "dataplane: remove RFifoLock". It's in patch 17.
Thanks, this helps indeed.
>
>
> diff --git a/async.c b/async.c
> index f30d011..fb37b03 100644
> --- a/async.c
> +++ b/async.c
> @@ -61,6 +61,7 @@ void aio_bh_schedule_oneshot(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
> smp_wmb();
> ctx->first_bh = bh;
> qemu_mutex_unlock(&ctx->bh_lock);
> + aio_notify(ctx);
> }
>
> QEMUBH *aio_bh_new(AioContext *ctx, QEMUBHFunc *cb, void *opaque)
>
> Thanks,
>
> Paolo
>
--
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-27 12:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 3:30 [Qemu-devel] "block: use aio_bh_schedule_oneshot" breaks ibm-vscsi Alexey Kardashevskiy
2016-10-27 7:57 ` Paolo Bonzini
2016-10-27 12:02 ` Alexey Kardashevskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).