mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update vendored go-ceph to v0.6
Closes: #1547 Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
268c0f1965
commit
29c78f97c0
14
vendor/github.com/ceph/go-ceph/rbd/rbd_nautilus.go
generated
vendored
14
vendor/github.com/ceph/go-ceph/rbd/rbd_nautilus.go
generated
vendored
@ -101,3 +101,17 @@ func (image *Image) GetModifyTimestamp() (Timespec, error) {
|
||||
|
||||
return Timespec(ts.CStructToTimespec(ts.CTimespecPtr(&cts))), nil
|
||||
}
|
||||
|
||||
// Sparsify makes an image sparse by deallocating runs of zeros.
|
||||
// The sparseSize value will be used to find runs of zeros and must be
|
||||
// a power of two no less than 4096 and no larger than the image size.
|
||||
//
|
||||
// Implements:
|
||||
// int rbd_sparsify(rbd_image_t image, size_t sparse_size);
|
||||
func (image *Image) Sparsify(sparseSize uint) error {
|
||||
if err := image.validate(imageIsOpen); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return getError(C.rbd_sparsify(image.image, C.size_t(sparseSize)))
|
||||
}
|
||||
|
Reference in New Issue
Block a user