qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sheepdog block driver and read write error policy
@ 2017-11-16  8:11 Vasiliy Tolstov
  2017-11-16  8:27 ` Fam Zheng
  0 siblings, 1 reply; 3+ messages in thread
From: Vasiliy Tolstov @ 2017-11-16  8:11 UTC (permalink / raw)
  To: qemu-devel

Hi. I'm try to write own sheepdog compatible daemon and test it with qemu.
Sometimes ago in qemu added read write error policy to allow to stop
domain or continue or something else. As i see in case of sheepdog
this policy is ignored and qemu try to reconnect to sheepdog daemon.
If nobody wants i can try to fix this, and if policy is not specified
work like now.
Where i need to start to easy understand how this works in case of file raw ?

Also i'm fedora user with virt-preview repo and see, that if sheepdog
daemon is unavailable 2 or more minutes and started after that qemu
crashed. Does i need to retest with latest qemu version?
b2587932582333197c88bf663785b19f441989d7
f1af3251f885f3b8adf73ba078500f2eeefbedae
5eceb01adfbe513c0309528293b0b86e32a6e27d


qemu-system-x86_64 -machine q35 -accel kvm -m 512M -vnc 0.0.0.0:1
-device virtio-scsi-pci,id=scsi0 -drive
aio=native,rerror=stop,werror=stop,if=none,format=raw,id=drive-scsi-disk0,cache=none,file=sheepdog:test,discard=unmap,detect-zeroes=off
 -device scsi-hd,bus=scsi0.0,drive=drive-scsi-disk0,id=device-scsi-disk0
qemu-system-x86_64: failed to get the header, Invalid argument
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: failed to send a req, Bad file descriptor
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused
qemu-system-x86_64: Failed to connect socket: Connection refused



qemu-system-x86_64: /builddir/build/BUILD/qemu-2.9.0/util/iov.c:167:
iov_send_recv: Assertion `niov < iov_cnt' failed.
Makefile:5: recipe for target 'test' failed
make: *** [test] Aborted (core dumped)

And if someone from fedora/redhat team is present - when new qemu
version available in virt preview repo for fedora 25 or it EOL?

-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] sheepdog block driver and read write error policy
  2017-11-16  8:11 [Qemu-devel] sheepdog block driver and read write error policy Vasiliy Tolstov
@ 2017-11-16  8:27 ` Fam Zheng
  2017-11-16  9:11   ` Vasiliy Tolstov
  0 siblings, 1 reply; 3+ messages in thread
From: Fam Zheng @ 2017-11-16  8:27 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: qemu-devel

On Thu, 11/16 11:11, Vasiliy Tolstov wrote:
> Hi. I'm try to write own sheepdog compatible daemon and test it with qemu.
> Sometimes ago in qemu added read write error policy to allow to stop
> domain or continue or something else. As i see in case of sheepdog
> this policy is ignored and qemu try to reconnect to sheepdog daemon.
> If nobody wants i can try to fix this, and if policy is not specified
> work like now.
> Where i need to start to easy understand how this works in case of file raw ?

The driver callbacks (sd_co_readv/sd_co_writev) should simply return error
instead of retrying.

> 
> Also i'm fedora user with virt-preview repo and see, that if sheepdog
> daemon is unavailable 2 or more minutes and started after that qemu
> crashed. Does i need to retest with latest qemu version?
> b2587932582333197c88bf663785b19f441989d7
> f1af3251f885f3b8adf73ba078500f2eeefbedae
> 5eceb01adfbe513c0309528293b0b86e32a6e27d
> 
> 
> qemu-system-x86_64 -machine q35 -accel kvm -m 512M -vnc 0.0.0.0:1
> -device virtio-scsi-pci,id=scsi0 -drive
> aio=native,rerror=stop,werror=stop,if=none,format=raw,id=drive-scsi-disk0,cache=none,file=sheepdog:test,discard=unmap,detect-zeroes=off
>  -device scsi-hd,bus=scsi0.0,drive=drive-scsi-disk0,id=device-scsi-disk0
> qemu-system-x86_64: failed to get the header, Invalid argument
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: failed to send a req, Bad file descriptor
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> qemu-system-x86_64: Failed to connect socket: Connection refused
> 
> 
> 
> qemu-system-x86_64: /builddir/build/BUILD/qemu-2.9.0/util/iov.c:167:
> iov_send_recv: Assertion `niov < iov_cnt' failed.
> Makefile:5: recipe for target 'test' failed
> make: *** [test] Aborted (core dumped)
> 
> And if someone from fedora/redhat team is present - when new qemu
> version available in virt preview repo for fedora 25 or it EOL?

It's recommended to use qemu.git if you want to develop new features for QEMU:

http://wiki.qemu.org/Contribute

Fam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] sheepdog block driver and read write error policy
  2017-11-16  8:27 ` Fam Zheng
@ 2017-11-16  9:11   ` Vasiliy Tolstov
  0 siblings, 0 replies; 3+ messages in thread
From: Vasiliy Tolstov @ 2017-11-16  9:11 UTC (permalink / raw)
  To: Fam Zheng; +Cc: qemu-devel

2017-11-16 11:27 GMT+03:00 Fam Zheng <famz@redhat.com>:
> On Thu, 11/16 11:11, Vasiliy Tolstov wrote:
>> Hi. I'm try to write own sheepdog compatible daemon and test it with qemu.
>> Sometimes ago in qemu added read write error policy to allow to stop
>> domain or continue or something else. As i see in case of sheepdog
>> this policy is ignored and qemu try to reconnect to sheepdog daemon.
>> If nobody wants i can try to fix this, and if policy is not specified
>> work like now.
>> Where i need to start to easy understand how this works in case of file raw ?
>
> The driver callbacks (sd_co_readv/sd_co_writev) should simply return error
> instead of retrying.
>


Thanks,  how can i pass options to block driver? (as i understand
read/write policy affects concrete hardware - scsi/ide and need to be
passed down to lower level)

Also about sheepdog driver, i'm re-read discussion
https://patchwork.ozlabs.org/patch/501533/ and have a question - if
all logic about overlapping requests and oids calculation go from qemu
to sheepdog daemon,
does this be slowdown or not in case of iops? (I think that if qemu
driver only read/write/discard some block data it can be more simplify
and have less errors, and sheepdog daemon can handle internally all
overlapping and inode updates)
I'm understand that this may be completely new sheepdog qemu driver,
but i think that if sheepdog driver is more like nbd/rbd it can be
more simple...


-- 
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-16  9:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-16  8:11 [Qemu-devel] sheepdog block driver and read write error policy Vasiliy Tolstov
2017-11-16  8:27 ` Fam Zheng
2017-11-16  9:11   ` Vasiliy Tolstov

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).