mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update go-ceph to v0.5.0
as go-ceph is 0.5.0 is released updating the dependency to latest release. more info about release at https://github.com/ceph/go-ceph/releases/tag/v0.5.0 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
5f6fec5f0a
commit
2808d526bb
58
vendor/github.com/ceph/go-ceph/rbd/rbd_nautilus.go
generated
vendored
58
vendor/github.com/ceph/go-ceph/rbd/rbd_nautilus.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
// +build !luminous,!mimic
|
||||
//
|
||||
// Ceph Nautilus is the first release that includes rbd_list2().
|
||||
// Ceph Nautilus is the first release that includes rbd_list2() and
|
||||
// rbd_get_create_timestamp().
|
||||
|
||||
package rbd
|
||||
|
||||
@ -14,6 +15,7 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/ceph/go-ceph/internal/retry"
|
||||
ts "github.com/ceph/go-ceph/internal/timespec"
|
||||
"github.com/ceph/go-ceph/rados"
|
||||
)
|
||||
|
||||
@ -45,3 +47,57 @@ func GetImageNames(ioctx *rados.IOContext) ([]string, error) {
|
||||
}
|
||||
return names, nil
|
||||
}
|
||||
|
||||
// GetCreateTimestamp returns the time the rbd image was created.
|
||||
//
|
||||
// Implements:
|
||||
// int rbd_get_create_timestamp(rbd_image_t image, struct timespec *timestamp);
|
||||
func (image *Image) GetCreateTimestamp() (Timespec, error) {
|
||||
if err := image.validate(imageIsOpen); err != nil {
|
||||
return Timespec{}, err
|
||||
}
|
||||
|
||||
var cts C.struct_timespec
|
||||
|
||||
if ret := C.rbd_get_create_timestamp(image.image, &cts); ret < 0 {
|
||||
return Timespec{}, getError(ret)
|
||||
}
|
||||
|
||||
return Timespec(ts.CStructToTimespec(ts.CTimespecPtr(&cts))), nil
|
||||
}
|
||||
|
||||
// GetAccessTimestamp returns the time the rbd image was last accessed.
|
||||
//
|
||||
// Implements:
|
||||
// int rbd_get_access_timestamp(rbd_image_t image, struct timespec *timestamp);
|
||||
func (image *Image) GetAccessTimestamp() (Timespec, error) {
|
||||
if err := image.validate(imageIsOpen); err != nil {
|
||||
return Timespec{}, err
|
||||
}
|
||||
|
||||
var cts C.struct_timespec
|
||||
|
||||
if ret := C.rbd_get_access_timestamp(image.image, &cts); ret < 0 {
|
||||
return Timespec{}, getError(ret)
|
||||
}
|
||||
|
||||
return Timespec(ts.CStructToTimespec(ts.CTimespecPtr(&cts))), nil
|
||||
}
|
||||
|
||||
// GetModifyTimestamp returns the time the rbd image was last modified.
|
||||
//
|
||||
// Implements:
|
||||
// int rbd_get_modify_timestamp(rbd_image_t image, struct timespec *timestamp);
|
||||
func (image *Image) GetModifyTimestamp() (Timespec, error) {
|
||||
if err := image.validate(imageIsOpen); err != nil {
|
||||
return Timespec{}, err
|
||||
}
|
||||
|
||||
var cts C.struct_timespec
|
||||
|
||||
if ret := C.rbd_get_modify_timestamp(image.image, &cts); ret < 0 {
|
||||
return Timespec{}, getError(ret)
|
||||
}
|
||||
|
||||
return Timespec(ts.CStructToTimespec(ts.CTimespecPtr(&cts))), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user