qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] COMPARE_AND_WRITE support for rbd driver
@ 2019-09-19  5:36 Yaowei Bai
  2019-09-20 11:22 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Yaowei Bai @ 2019-09-19  5:36 UTC (permalink / raw)
  To: pbonzini, fam, dillaman, kwolf, mreitz; +Cc: baiyaowei, qemu-devel, qemu-block

baiyaowei@cmss.chinamobile.com 
Bcc: 
Subject: COMPARE_AND_WRITE support for rbd driver
Reply-To: baiyaowei@cmss.chinamobile.com

Hey guys,

I noticed that COMPARE_AND_WRITE had been supported by CEPH/librbd since
v12.1.1. And in my company, we use this COMPARE_AND_WRITE support in
CEPH with the ISCSI protocol. More precisely, we use tgt and CEPH with this
COMPARE_AND_WRITE support as the SCSI target and export it to the remote
hosts. And then VMs on remote hosts can use these SCSI targets through ISCSI
initiator support in QEMU directly or as local SCSI disks. But unfortunately,
there're some issues with this tgt case. So i think maybe we could also add this
COMPARE_AND_WRITE support into the rbd driver in QEMU so we can leave the
ISCSI/tgt alone and use this COMPARE_AND_WRITE support with the
scsi-disk <--> virtio-scsi <--> rbd driver path. This can also apply to
the WRITESAME support in CEPH/librbd.

So is it suitable for doing this? I want to hear suggestions from you
genius guys. Appreciate it.




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

* Re: COMPARE_AND_WRITE support for rbd driver
  2019-09-19  5:36 [Qemu-devel] COMPARE_AND_WRITE support for rbd driver Yaowei Bai
@ 2019-09-20 11:22 ` Paolo Bonzini
  2019-09-20 15:26   ` Yaowei Bai
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2019-09-20 11:22 UTC (permalink / raw)
  To: Yaowei Bai, fam, dillaman, kwolf, mreitz; +Cc: qemu-devel, qemu-block

On 19/09/19 07:36, Yaowei Bai wrote:
> baiyaowei@cmss.chinamobile.com 
> Bcc: 
> Subject: COMPARE_AND_WRITE support for rbd driver
> Reply-To: baiyaowei@cmss.chinamobile.com
> 
> Hey guys,
> 
> I noticed that COMPARE_AND_WRITE had been supported by CEPH/librbd since
> v12.1.1. And in my company, we use this COMPARE_AND_WRITE support in
> CEPH with the ISCSI protocol. More precisely, we use tgt and CEPH with this
> COMPARE_AND_WRITE support as the SCSI target and export it to the remote
> hosts. And then VMs on remote hosts can use these SCSI targets through ISCSI
> initiator support in QEMU directly or as local SCSI disks. But unfortunately,
> there're some issues with this tgt case. So i think maybe we could also add this
> COMPARE_AND_WRITE support into the rbd driver in QEMU so we can leave the
> ISCSI/tgt alone and use this COMPARE_AND_WRITE support with the
> scsi-disk <--> virtio-scsi <--> rbd driver path. This can also apply to
> the WRITESAME support in CEPH/librbd.
> 
> So is it suitable for doing this?

Yes, it would be suitable.  In a nutshell you would have to add support
for COMPARE_AND_WRITE to block/io.c (calling into a new BlockDriver
function pointer), block/rbd.c and hw/scsi/scsi-disk.c.

Paolo


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

* Re: COMPARE_AND_WRITE support for rbd driver
  2019-09-20 11:22 ` Paolo Bonzini
@ 2019-09-20 15:26   ` Yaowei Bai
  0 siblings, 0 replies; 3+ messages in thread
From: Yaowei Bai @ 2019-09-20 15:26 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: fam, kwolf, qemu-block, qemu-devel, mreitz, yangjun, baiyaowei, dillaman

On Fri, Sep 20, 2019 at 01:22:02PM +0200, Paolo Bonzini wrote:
> On 19/09/19 07:36, Yaowei Bai wrote:
> > 
> > Hey guys,
> > 
> > I noticed that COMPARE_AND_WRITE had been supported by CEPH/librbd since
> > v12.1.1. And in my company, we use this COMPARE_AND_WRITE support in
> > CEPH with the ISCSI protocol. More precisely, we use tgt and CEPH with this
> > COMPARE_AND_WRITE support as the SCSI target and export it to the remote
> > hosts. And then VMs on remote hosts can use these SCSI targets through ISCSI
> > initiator support in QEMU directly or as local SCSI disks. But unfortunately,
> > there're some issues with this tgt case. So i think maybe we could also add this
> > COMPARE_AND_WRITE support into the rbd driver in QEMU so we can leave the
> > ISCSI/tgt alone and use this COMPARE_AND_WRITE support with the
> > scsi-disk <--> virtio-scsi <--> rbd driver path. This can also apply to
> > the WRITESAME support in CEPH/librbd.
> > 
> > So is it suitable for doing this?
> 
> Yes, it would be suitable.  In a nutshell you would have to add support
> for COMPARE_AND_WRITE to block/io.c (calling into a new BlockDriver
> function pointer), block/rbd.c and hw/scsi/scsi-disk.c.

OK, i'll try to implement this and send it out for review. Thanks Paolo.

> 
> Paolo




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

end of thread, other threads:[~2019-09-20 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-19  5:36 [Qemu-devel] COMPARE_AND_WRITE support for rbd driver Yaowei Bai
2019-09-20 11:22 ` Paolo Bonzini
2019-09-20 15:26   ` Yaowei Bai

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