mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rbd: add function (cc *ClusterConnection) GetTaskAdmin()
This function returns new go-ceph TaskAdmin to add tasks on rbd volumes. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -131,6 +131,16 @@ func (cc *ClusterConnection) GetRBDAdmin() (*ra.RBDAdmin, error) {
|
||||
return ra.NewFromConn(cc.conn), nil
|
||||
}
|
||||
|
||||
// GetTaskAdmin returns TaskAdmin to add tasks on rbd images.
|
||||
func (cc *ClusterConnection) GetTaskAdmin() (*ra.TaskAdmin, error) {
|
||||
rbdAdmin, err := cc.GetRBDAdmin()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return rbdAdmin.Task(), nil
|
||||
}
|
||||
|
||||
// DisableDiscardOnZeroedWriteSame enables the
|
||||
// `rbd_discard_on_zeroed_write_same` option in the cluster connection, so that
|
||||
// writing zero blocks of data are actual writes on the OSDs (doing
|
||||
|
Reference in New Issue
Block a user