rbd: improve doc comment style for various rbd functions
@@ -194,7 +194,7 @@ func GetError(err C.int) error {
}
}
-//
+// Version returns the major, minor, and patch level of the librbd library.
func Version() (int, int, int) {
var c_major, c_minor, c_patch C.int
C.rbd_version(&c_major, &c_minor, &c_patch)
@@ -233,9 +233,12 @@ func GetImage(ioctx *rados.IOContext, name string) *Image {
}
}
+// Create a new rbd image.
+//
+// Implements:
// int rbd_create(rados_ioctx_t io, const char *name, uint64_t size, int *order);
//
-// But also (for backward compability):
+// Also implements (for backward compatibility):
// int rbd_create2(rados_ioctx_t io, const char *name, uint64_t size,
// uint64_t features, int *order);
// int rbd_create3(rados_ioctx_t io, const char *name, uint64_t size,
@@ -273,6 +276,9 @@ func Create(ioctx *rados.IOContext, name string, size uint64, order int,
}, nil
}
+// Create2 creates a new rbd image using provided features.
+//
+// Implements:
// int rbd_create2(rados_ioctx_t io, const char *name, uint64_t size,
// uint64_t features, int *order);
func Create2(ioctx *rados.IOContext, name string, size uint64, features uint64,
@@ -296,6 +302,10 @@ func Create2(ioctx *rados.IOContext, name string, size uint64, features uint64,
}, nil
}
+// Create3 creates a new rbd image using provided features and stripe
+// parameters.
+//
+// Implements:
// int rbd_create3(rados_ioctx_t io, const char *name, uint64_t size,
// uint64_t features, int *order,
// uint64_t stripe_unit, uint64_t stripe_count);
@@ -321,6 +331,9 @@ func Create3(ioctx *rados.IOContext, name string, size uint64, features uint64,
}, nil
}
+// Create4 creates a new rbd image using provided image options.
+//
+// Implements:
// int rbd_create4(rados_ioctx_t io, const char *name, uint64_t size,
// rbd_image_options_t opts);
func Create4(ioctx *rados.IOContext, name string, size uint64, rio *RbdImageOptions) (image *Image, err error) {
