Bug 1092208 - RBD volumes created with reversed stripe_unit and stripe_count parameters
Summary: RBD volumes created with reversed stripe_unit and stripe_count parameters
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-29 02:00 UTC by Anchor Systems Managed Hosting
Modified: 2014-04-29 04:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-29 04:15:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Anchor Systems Managed Hosting 2014-04-29 02:00:52 UTC
Description of problem:

When creating an RBD volume with 'virsh vol-create-as', the newly created volume gets a stripe unit of 1 byte and a stripe count of 4194304. This results in an RBD volume which is unusably slow (in my tests, it took over 30 minutes for GRUB to load in an affected guest).


How reproducible:

Run the following on an RBD-enabled system:
  virsh vol-create-as $RBD_POOL test 10G
  rbd info $RBD_POOL/test


Actual results:

'rbd info' reports a stripe unit and count as described above.


Expected results:

The stripe unit should be 4 MiB, and the stripe count should be 1.


Additional info:

This is caused by incorrect parameter ordering on line 495 of src/storage/storage_backend_rbd.c. libvirt passes stripe_count before stripe_unit to rbd_create3, but the order of these parameters in librbd.h has stripe_unit before stripe_count. Thus, these parameters end up being reversed.

I will be sending a trivial patch which fixes this problem to the libvirt mailing list shortly.

Comment 1 Eric Blake 2014-04-29 04:15:51 UTC
Will be in 1.2.4 release

commit 4cd508ba4fc3cc33c72629fe8b9012e73d8dd8bf
Author: Steven McDonald <steven.mcdonald.au>
Date:   Tue Apr 29 12:19:01 2014 +1000

    storage_backend_rbd: Correct argument order to rbd_create3
    
    The stripe_unit and stripe_count arguments are passed to rbd_create3 in
    the wrong order, resulting in a stripe size of 1 byte with 4194304
    stripes on newly created RBD volumes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1092208
    Signed-off-by: Steven McDonald <steven.mcdonald.au>


Note You need to log in before you can comment on or make changes to this bug.