Project

General

Profile

Actions

Fix #3588

closed

rbd.py's clone should take stripe parms, call rbd_clone2

Added by Dan Mick over 11 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Actions #1

Updated by Dan Mick over 11 years ago

  • Project changed from Ceph to rbd
Actions #2

Updated by Dan Mick over 11 years ago

In danger of forgetting about this unless I write it down somewhere:

diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py
index da5bc69..5ade3de 100644
--- a/src/pybind/rbd.py
+++ b/src/pybind/rbd.py
@@ -175,7 +175,7 @@ class RBD(object):
             raise make_ex(ret, 'error creating image')

     def clone(self, p_ioctx, p_name, p_snapname, c_ioctx, c_name,
-              features=0, order=None):
+              features=0, order=None, stripe_unit = 0, stripe_count = 0):
         """ 
         Clone a parent rbd snapshot into a COW sparse child.

@@ -206,11 +206,13 @@ class RBD(object):
         if not isinstance(c_name, str):
             raise TypeError('child name must be a string')

-        ret = self.librbd.rbd_clone(p_ioctx.io, c_char_p(p_name),
+        ret = self.librbd.rbd_clone2(p_ioctx.io, c_char_p(p_name),
                                     c_char_p(p_snapname),
                                     c_ioctx.io, c_char_p(c_name),
-                                          c_uint64(features),
-                                          byref(c_int(order)))
+                                    c_uint64(features),
+                                    byref(c_int(order)), 
+                                    c_uint64(stripe_unit),
+                                    c_uint64(stripe_count))
         if ret < 0:
             raise make_ex(ret, 'error creating clone')
Actions #3

Updated by Sage Weil over 11 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Josh Durgin about 11 years ago

  • Assignee set to Josh Durgin
Actions #5

Updated by Josh Durgin about 11 years ago

  • Status changed from In Progress to 12
Actions #6

Updated by Ian Colle over 10 years ago

  • Tracker changed from Bug to Fix
Actions #7

Updated by Josh Durgin over 9 years ago

  • Target version set to v0.93 - Last Hammer Sprint
Actions #8

Updated by Josh Durgin about 9 years ago

  • Target version deleted (v0.93 - Last Hammer Sprint)
Actions #9

Updated by Josh Durgin about 8 years ago

  • Status changed from 12 to Resolved
  • Assignee deleted (Josh Durgin)

Fixed as part of the new image create api use in commit:c3be44ed8f9d99d7257156f2e0bf7ef6ea1b5761

Actions

Also available in: Atom PDF