Re: QEMU RBD is slow with QCOW2 images

2021-03-03 Thread Jason Dillaman
On Wed, Mar 3, 2021 at 12:41 PM Stefano Garzarella wrote: > > Hi Jason, > as reported in this BZ [1], when qemu-img creates a QCOW2 image on RBD > writing data is very slow compared to a raw file. > > Comparing raw vs QCOW2 image creation with RBD I found that we use a > different object size, for

Re: [PATCH V2 1/7] block/rbd: bump librbd requirement to luminous release

2021-02-22 Thread Jason Dillaman
On Mon, Feb 15, 2021 at 8:29 AM Peter Lieven wrote: > > Am 15.02.21 um 13:13 schrieb Kevin Wolf: > > Am 15.02.2021 um 12:45 hat Peter Lieven geschrieben: > >> Am 15.02.21 um 12:41 schrieb Daniel P. Berrangé: > >>> On Mon, Feb 15, 2021 at 12:32:24PM +0100, Peter Lieven wrote: > Am 15.02.21 um

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-21 Thread Jason Dillaman
On Thu, Jan 21, 2021 at 3:29 PM Peter Lieven wrote: > > Am 21.01.21 um 20:42 schrieb Jason Dillaman: > > On Wed, Jan 20, 2021 at 6:01 PM Peter Lieven wrote: > >> > >>> Am 19.01.2021 um 15:20 schrieb Jason Dillaman : > >>> > >>> On Tue

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-21 Thread Jason Dillaman
On Wed, Jan 20, 2021 at 6:01 PM Peter Lieven wrote: > > > > Am 19.01.2021 um 15:20 schrieb Jason Dillaman : > > > > On Tue, Jan 19, 2021 at 4:36 AM Peter Lieven wrote: > >>> Am 18.01.21 um 23:33 schrieb Jason Dillaman: > >>> On Fri, Jan 15,

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-19 Thread Jason Dillaman
On Tue, Jan 19, 2021 at 4:36 AM Peter Lieven wrote: > > Am 18.01.21 um 23:33 schrieb Jason Dillaman: > > On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: > >> Am 15.01.21 um 16:27 schrieb Jason Dillaman: > >>> On Thu, Jan 14, 2021 at 2:59 PM Peter Lieven w

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-18 Thread Jason Dillaman
On Fri, Jan 15, 2021 at 10:39 AM Peter Lieven wrote: > > Am 15.01.21 um 16:27 schrieb Jason Dillaman: > > On Thu, Jan 14, 2021 at 2:59 PM Peter Lieven wrote: > >> Am 14.01.21 um 20:19 schrieb Jason Dillaman: > >>> On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-15 Thread Jason Dillaman
On Thu, Jan 14, 2021 at 2:59 PM Peter Lieven wrote: > > Am 14.01.21 um 20:19 schrieb Jason Dillaman: > > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > >> since we implement byte interfaces and librbd supports aio on byte > >> granularity we can li

Re: [PATCH 6/7] block/rbd: add write zeroes support

2021-01-15 Thread Jason Dillaman
On Thu, Jan 14, 2021 at 2:41 PM Peter Lieven wrote: > > Am 14.01.21 um 20:19 schrieb Jason Dillaman: > > On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > >> Signed-off-by: Peter Lieven > >> --- > >> block/rbd.c | 31

Re: [PATCH 3/7] block/rbd: use stored image_size in qemu_rbd_getlength

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index bc8cf8af9b..a2da70e37f 100644 > --- a/block/rbd.c > +++ b/block/rbd.c > @@

Re: [PATCH 6/7] block/rbd: add write zeroes support

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 31 ++- > 1 file changed, 30 insertions(+), 1 deletion(-) > > diff --git a/block/rbd.c b/block/rbd.c > index 2d77d0007f..27b4404adf 100644 > --- a/block/rbd.c >

Re: [PATCH 4/7] block/rbd: add bdrv_{attach,detach}_aio_context

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index a2da70e37f..27b232f4d8 100644 > --- a/block/rbd.c > +++ b/blo

Re: [PATCH 7/7] block/rbd: change request alignment to 1 byte

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > since we implement byte interfaces and librbd supports aio on byte > granularity we can lift > the 512 byte alignment. > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/block/rbd

Re: [PATCH 5/7] block/rbd: migrate from aio to coroutines

2021-01-14 Thread Jason Dillaman
On Sun, Dec 27, 2020 at 11:42 AM Peter Lieven wrote: > > Signed-off-by: Peter Lieven > --- > block/rbd.c | 247 ++-- > 1 file changed, 84 insertions(+), 163 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index 27b232f4d8..2d77d0007f 1006

Re: qemu 6.0 rbd driver rewrite

2020-12-09 Thread Jason Dillaman
On Wed, Dec 9, 2020 at 7:19 AM Peter Lieven wrote: > > Am 01.12.20 um 13:40 schrieb Peter Lieven: > > Hi, > > > > > > i would like to submit a series for 6.0 which will convert the aio hooks to > > native coroutine hooks and add write zeroes support. > > > > The aio routines are nowadays just an

Re: [PATCH] block/rbd: add 'namespace' to qemu_rbd_strong_runtime_opts[]

2020-09-14 Thread Jason Dillaman
qemu_rbd_create_opts = { > > static const char *const qemu_rbd_strong_runtime_opts[] = { > "pool", > +"namespace", > "image", > "conf", > "snapshot", > -- > 2.26.2 > lgtm Reviewed-by: Jason Dillaman -- Jason

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-29 Thread Jason Dillaman
On Mon, Jul 29, 2019 at 5:40 AM Stefano Garzarella wrote: > > On Fri, Jul 26, 2019 at 08:46:56AM -0400, Jason Dillaman wrote: > > On Fri, Jul 26, 2019 at 4:48 AM Stefano Garzarella > > wrote: > > > > > > On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Di

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-26 Thread Jason Dillaman
On Fri, Jul 26, 2019 at 4:48 AM Stefano Garzarella wrote: > > On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Dillaman wrote: > > On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella > > wrote: > > > > > > On Wed, Jul 24, 2019 at 01:48:42PM -0400, Jason Di

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-25 Thread Jason Dillaman
On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella wrote: > > On Wed, Jul 24, 2019 at 01:48:42PM -0400, Jason Dillaman wrote: > > On Tue, Jul 23, 2019 at 3:13 AM Stefano Garzarella > > wrote: > > > > > > This patch adds the support of preallocation (off/

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-24 Thread Jason Dillaman
On Tue, Jul 23, 2019 at 3:13 AM Stefano Garzarella wrote: > > This patch adds the support of preallocation (off/full) for the RBD > block driver. > If rbd_writesame() is available and supports zeroed buffers, we use > it to quickly fill the image when full preallocation is required. > > Signed-off

Re: [Qemu-block] [PATCH v3] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-07-09 Thread Jason Dillaman
On Tue, Jul 9, 2019 at 11:32 AM Max Reitz wrote: > > On 09.07.19 15:09, Stefano Garzarella wrote: > > On Tue, Jul 09, 2019 at 08:55:19AM -0400, Jason Dillaman wrote: > >> On Tue, Jul 9, 2019 at 5:45 AM Max Reitz wrote: > >>> > >>> On 09.07.19 10:

Re: [Qemu-block] [PATCH v3] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-07-09 Thread Jason Dillaman
On Tue, Jul 9, 2019 at 5:45 AM Max Reitz wrote: > > On 09.07.19 10:55, Max Reitz wrote: > > On 09.07.19 05:08, Jason Dillaman wrote: > >> On Fri, Jul 5, 2019 at 6:43 AM Stefano Garzarella > >> wrote: > >>> > >>> On Fri, Jul 05, 2019 at 11:58

Re: [Qemu-block] [PATCH v3] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-07-08 Thread Jason Dillaman
On Fri, Jul 5, 2019 at 6:43 AM Stefano Garzarella wrote: > > On Fri, Jul 05, 2019 at 11:58:43AM +0200, Max Reitz wrote: > > On 05.07.19 11:32, Stefano Garzarella wrote: > > > This patch allows 'qemu-img info' to show the 'disk size' for > > > the RBD images that have the fast-diff feature enabled.

Re: [Qemu-block] [PATCH v2] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-07-02 Thread Jason Dillaman
On Fri, Jun 28, 2019 at 4:59 AM Stefano Garzarella wrote: > > On Thu, Jun 27, 2019 at 03:43:04PM -0400, Jason Dillaman wrote: > > On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > > > On 6/27/19 4:48 AM, Stefano Garzarella wrote: > > > > On Wed, Jun 26, 2019 at

Re: [Qemu-block] [PATCH v2] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-06-27 Thread Jason Dillaman
On Thu, Jun 27, 2019 at 3:45 PM John Snow wrote: > > > > On 6/27/19 3:43 PM, Jason Dillaman wrote: > > On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > >> > >> > >> > >> On 6/27/19 4:48 AM, Stefano Garzarella wrote: > >>> On

Re: [Qemu-block] [PATCH v2] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-06-27 Thread Jason Dillaman
On Thu, Jun 27, 2019 at 1:24 PM John Snow wrote: > > > > On 6/27/19 4:48 AM, Stefano Garzarella wrote: > > On Wed, Jun 26, 2019 at 05:04:25PM -0400, John Snow wrote: > >> It looks like this has hit a 30 day expiration without any reviews or > >> being merged; do we still want this? If so, can you

Re: [Qemu-block] [Qemu-devel] [PATCH v2] block/rbd: increase dynamically the image size

2019-05-03 Thread Jason Dillaman
On Fri, May 3, 2019 at 12:30 PM Stefano Garzarella wrote: > > RBD APIs don't allow us to write more than the size set with > rbd_create() or rbd_resize(). > In order to support growing images (eg. qcow2), we resize the > image before write operations that exceed the current size. > > Signed-off-by

Re: [Qemu-block] [PATCH] block/rbd: implement .bdrv_get_allocated_file_size callback

2019-05-03 Thread Jason Dillaman
On Fri, May 3, 2019 at 7:02 AM Stefano Garzarella wrote: > > This patch allows 'qemu-img info' to show the 'disk size' for > rbd images. We use the rbd_diff_iterate2() API to calculate the > allocated size for the image. > > Signed-off-by: Stefano Garzarella > --- > block/rbd.c | 33

Re: [Qemu-block] [PATCH] block/rbd: add preallocation support

2019-04-29 Thread Jason Dillaman
On Mon, Apr 29, 2019 at 8:47 AM Stefano Garzarella wrote: > > On Sat, Apr 27, 2019 at 08:43:26AM -0400, Jason Dillaman wrote: > > On Sat, Apr 27, 2019 at 7:37 AM Stefano Garzarella > > wrote: > > > > > > This patch adds the support of preallocation (off/

Re: [Qemu-block] [PATCH] block/rbd: add preallocation support

2019-04-27 Thread Jason Dillaman
On Sat, Apr 27, 2019 at 7:37 AM Stefano Garzarella wrote: > > This patch adds the support of preallocation (off/full) for the RBD > block driver. > If available, we use rbd_writesame() to quickly fill the image when > full preallocation is required. > > Signed-off-by: Stefano Garzarella > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH RFC 1/1] block/rbd: increase dynamically the image size

2019-04-14 Thread Jason Dillaman
On Sun, Apr 14, 2019 at 9:20 AM Stefano Garzarella wrote: > > On Thu, Apr 11, 2019 at 01:06:49PM -0400, Jason Dillaman wrote: > > On Thu, Apr 11, 2019 at 9:02 AM Stefano Garzarella > > wrote: > > > > > > On Thu, Apr 11, 2019 at 08:35:44AM -0400, Jason Di

Re: [Qemu-block] [Qemu-devel] [PATCH RFC 1/1] block/rbd: increase dynamically the image size

2019-04-11 Thread Jason Dillaman
On Thu, Apr 11, 2019 at 9:02 AM Stefano Garzarella wrote: > > On Thu, Apr 11, 2019 at 08:35:44AM -0400, Jason Dillaman wrote: > > On Thu, Apr 11, 2019 at 7:00 AM Stefano Garzarella > > wrote: > > > > > > RBD APIs don't allow us to write more tha

Re: [Qemu-block] [Qemu-devel] [PATCH RFC 1/1] block/rbd: increase dynamically the image size

2019-04-11 Thread Jason Dillaman
On Thu, Apr 11, 2019 at 7:00 AM Stefano Garzarella wrote: > > RBD APIs don't allow us to write more than the size set with rbd_create() > or rbd_resize(). > In order to support growing images (eg. qcow2), we resize the image > before RW operations that exceed the current size. What's the use-case

Re: [Qemu-block] [ovirt-users] Re: Debugging ceph access

2018-06-06 Thread Jason Dillaman
On Wed, Jun 6, 2018 at 7:20 AM, Bernhard Dick wrote: > Hi, > > Am 05.06.2018 um 22:11 schrieb Nir Soffer: >> >> On Fri, Jun 1, 2018 at 3:54 PM Stefan Hajnoczi > > wrote: >> >> On Thu, May 31, 2018 at 11:02:01PM +0300, Nir Soffer wrote: >> > On Thu, May 31, 2018

Re: [Qemu-block] [PATCH v2 4/6] rbd: Switch to byte-based callbacks

2018-04-24 Thread Jason Dillaman
On Tue, Apr 24, 2018 at 3:25 PM, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Make the change for the last few sector-based callbacks > in the rbd driver. > > Note that the driver was already using byte-based calls for > performing actual I/

Re: [Qemu-block] [PATCH] rbd: Detect rbd image resizes and propagate them

2017-09-13 Thread Jason Dillaman
On Wed, 2017-09-13 at 10:44 -0600, Adam Wolfe Gordon wrote: > Register a watcher with rbd so that we get notified when an image is > resized. Propagate resizes to parent block devices so that guest devices > get resized without user intervention. > > Signed-off-by: Adam Wolfe Gordon > --- > Hello

Re: [Qemu-block] [RFC v5] RBD: Add support readv,writev for rbd

2017-02-16 Thread Jason Dillaman
On Thu, Feb 16, 2017 at 10:13 AM, Alexandre DERUMIER wrote: > Hi, I would like to bench it with small 4k read/write. > > On the ceph side,do we need this PR ? : > https://github.com/ceph/ceph/pull/13447 Yes, that is the correct PR for the client-side librbd changes. You should be able to test it

Re: [Qemu-block] [RFC v5] RBD: Add support readv,writev for rbd

2017-02-16 Thread Jason Dillaman
On Thu, Feb 16, 2017 at 4:00 AM, wrote: > From: tianqing > > Rbd can do readv and writev directly, so wo do not need to transform > iov to buf or vice versa any more. > > Signed-off-by: tianqing > --- > block/rbd.c | 49 ++--- > 1 file changed, 42 in

Re: [Qemu-block] [PATCH] RBD: Add support readv,writev for rbd

2016-11-05 Thread Jason Dillaman
On Sat, Nov 5, 2016 at 1:17 AM, wrote: > From: tianqing > > Rbd can do readv and writev directly, so wo do not need to transform > iov to buf or vice versa any more. > > Signed-off-by: tianqing > --- > block/rbd.c | 124 > > 1 file

Re: [Qemu-block] [Qemu-devel] [PATCH v6 04/22] block: Introduce image file locking

2016-06-07 Thread Jason Dillaman
On Fri, Jun 3, 2016 at 4:48 AM, Fam Zheng wrote: > +typedef enum { > +/* The values are ordered so that lower number implies higher > restriction. > + * Starting from 1 to make 0 an invalid value. > + * */ > +BDRV_LOCKF_EXCLUSIVE = 1, > +BDRV_LOCKF_SHARED, > +BDRV_LOCKF_UN

Re: [Qemu-block] [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-18 Thread Jason Dillaman
On Wed, May 18, 2016 at 4:19 AM, Kevin Wolf wrote: >> Updating this setting on an open image won't do anything, but if you >> rbd_close() and rbd_open() it again the setting will take effect. >> rbd_close() will force a flush of any pending I/O in librbd and >> free the memory for librbd's ImageCt

Re: [Qemu-block] [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-17 Thread Jason Dillaman
On Tue, May 17, 2016 at 6:03 AM, Sebastian Färber wrote: > Hi Kevin, > >> A correct reopen implementation must consider all options and flags that >> .bdrv_open() looked at. >> >> The options are okay, as both "filename" and "password-secret" aren't >> things that we want to allow a reopen to chan

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking

2016-04-27 Thread Jason Dillaman
On Tue, Apr 26, 2016 at 7:20 PM, Fam Zheng wrote: > On Tue, 04/26 10:42, Jason Dillaman wrote: >> On Sun, Apr 24, 2016 at 7:42 PM, Fam Zheng wrote: >> > On Fri, 04/22 21:57, Jason Dillaman wrote: >> >> Since this cannot automatically recover from a crashed QEMU

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking

2016-04-26 Thread Jason Dillaman
On Sun, Apr 24, 2016 at 7:42 PM, Fam Zheng wrote: > On Fri, 04/22 21:57, Jason Dillaman wrote: >> Since this cannot automatically recover from a crashed QEMU client with an >> RBD image, perhaps this RBD locking should not default to enabled. >> Additionally, this w

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking

2016-04-22 Thread Jason Dillaman
Since this cannot automatically recover from a crashed QEMU client with an RBD image, perhaps this RBD locking should not default to enabled. Additionally, this will conflict with the "exclusive-lock" feature available since the Ceph Hammer-release since both utilize the same locking construct. As