mirror of https://github.com/ceph/go-ceph
rbd: add doc comment to Discard function
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
d71fb3b2ea
commit
223f1e01d7
|
@ -800,6 +800,11 @@ func (image *Image) Seek(offset int64, whence int) (int64, error) {
|
|||
return image.offset, nil
|
||||
}
|
||||
|
||||
// Discard the supplied range from the image. The supplied range will be read
|
||||
// as zeros once Discard returns. The discarded range will no longer take up
|
||||
// space.
|
||||
//
|
||||
// Implements:
|
||||
// int rbd_discard(rbd_image_t image, uint64_t ofs, uint64_t len);
|
||||
func (image *Image) Discard(ofs uint64, length uint64) (int, error) {
|
||||
if err := image.validate(imageIsOpen); err != nil {
|
||||
|
|
Loading…
Reference in New Issue