Commit Graph

7 Commits

Author SHA1 Message Date
Mudit Agarwal 736858ca7d rbd: add wrapper for rbd_snap_set_by_id()
Added wrapper for rbd_snap_set_by_id() function

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-24 14:03:01 -04:00
Mudit Agarwal 34cab3407f rbd: add a new version of GetParentInfo()
GetParentInfo() currently requires the caller to specify the
string length for various attributes it returns. If the
specified string length is less than required, it can return
ERANGE error. Replacing it with a new function which avoids
this.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-21 11:19:38 -04:00
John Mulligan dbf20aea0a rbd: add Sparsify implementing rbd_sparsify
The sparsify function can be used to make an image sparse by replacing
runs of zeros with holes. This change adds a wrapper for the basic
rbd_sparsify function and accompanying tests.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-08-27 14:22:52 -04:00
Sven Anderson 6c944e8b65 rbd: make RBDError type unexported
In order to avoid external dependencies on implementation details,
this change replaces RBDError with the unexported rbdError. In case
some application really needs access to the integer value, it can use
the pattern
  var errno interface{ Errno() int }
  if errors.As(err, errno) { ... errno.Errno() ... }

Signed-off-by: Sven Anderson <sven@redhat.com>
2020-07-17 13:47:32 -04:00
Niels de Vos d4440eb8c2 rbd: add simple test for Image.GetModifyTimestamp()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-06-22 09:22:18 -04:00
Niels de Vos 048ed11e63 rbd: add simple test for Image.GetAccessTimestamp()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-06-22 09:22:18 -04:00
Niels de Vos 8ef910e0c5 rbd: add simple test for Image.GetCreateTimestamp()
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-06-22 09:22:18 -04:00