rbd: improve doc comment style for various image status calls
@@ -515,6 +515,9 @@ func (image *Image) Resize(size uint64) error {
return GetError(C.rbd_resize(image.image, C.uint64_t(size)))
}
+// Stat an rbd image.
+//
+// Implements:
// int rbd_stat(rbd_image_t image, rbd_image_info_t *info, size_t infosize);
func (image *Image) Stat() (info *ImageInfo, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -537,6 +540,9 @@ func (image *Image) Stat() (info *ImageInfo, err error) {
Parent_name: C.GoString((*C.char)(&c_stat.parent_name[0]))}, nil
}
+// IsOldFormat returns true if the rbd image uses the old format.
+//
+// Implements:
// int rbd_get_old_format(rbd_image_t image, uint8_t *old);
func (image *Image) IsOldFormat() (old_format bool, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -553,6 +559,9 @@ func (image *Image) IsOldFormat() (old_format bool, err error) {
return c_old_format != 0, nil
}
+// GetSize returns the size of the rbd image.
+//
+// Implements:
// int rbd_size(rbd_image_t image, uint64_t *size);
func (image *Image) GetSize() (size uint64, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -566,6 +575,9 @@ func (image *Image) GetSize() (size uint64, err error) {
return size, nil
}
+// GetFeatures returns the features bitmask for the rbd image.
+//
+// Implements:
// int rbd_get_features(rbd_image_t image, uint64_t *features);
func (image *Image) GetFeatures() (features uint64, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -579,6 +591,9 @@ func (image *Image) GetFeatures() (features uint64, err error) {
return features, nil
}
+// GetStripeUnit returns the stripe-unit value for the rbd image.
+//
+// Implements:
// int rbd_get_stripe_unit(rbd_image_t image, uint64_t *stripe_unit);
func (image *Image) GetStripeUnit() (stripe_unit uint64, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -592,6 +607,9 @@ func (image *Image) GetStripeUnit() (stripe_unit uint64, err error) {
return stripe_unit, nil
}
+// GetStripeCount returns the stripe-count value for the rbd image.
+//
+// Implements:
// int rbd_get_stripe_count(rbd_image_t image, uint64_t *stripe_count);
func (image *Image) GetStripeCount() (stripe_count uint64, err error) {
if err := image.validate(imageIsOpen); err != nil {
@@ -605,6 +623,10 @@ func (image *Image) GetStripeCount() (stripe_count uint64, err error) {
return stripe_count, nil
}
+// GetOverlap returns the overlapping bytes between the rbd image and its
+// parent.
+//
+// Implements:
// int rbd_get_overlap(rbd_image_t image, uint64_t *overlap);
func (image *Image) GetOverlap() (overlap uint64, err error) {
if err := image.validate(imageIsOpen); err != nil {
