2021-10-18 20:26:15 +00:00
|
|
|
//go:build nautilus
|
2021-06-09 04:54:52 +00:00
|
|
|
// +build nautilus
|
2020-12-09 05:46:45 +00:00
|
|
|
|
|
|
|
package rados
|
|
|
|
|
|
|
|
// #cgo LDFLAGS: -lrados
|
|
|
|
// #include <rados/librados.h>
|
|
|
|
//
|
|
|
|
import "C"
|
|
|
|
|
2021-06-09 04:54:52 +00:00
|
|
|
// SetPoolFullTry makes sure to send requests to the cluster despite
|
|
|
|
// the cluster or pool being marked full; ops will either succeed(e.g., delete)
|
|
|
|
// or return EDQUOT or ENOSPC.
|
2020-12-09 05:46:45 +00:00
|
|
|
//
|
|
|
|
// Implements:
|
2023-04-26 07:05:57 +00:00
|
|
|
//
|
|
|
|
// void rados_set_osdmap_full_try(rados_ioctx_t io);
|
2021-06-09 04:54:52 +00:00
|
|
|
func (ioctx *IOContext) SetPoolFullTry() error {
|
2020-12-09 05:46:45 +00:00
|
|
|
if err := ioctx.validate(); err != nil {
|
2021-06-09 04:54:52 +00:00
|
|
|
return err
|
2020-12-09 05:46:45 +00:00
|
|
|
}
|
2021-06-09 04:54:52 +00:00
|
|
|
C.rados_set_osdmap_full_try(ioctx.ioctx)
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnsetPoolFullTry unsets the flag set by SetPoolFullTry()
|
|
|
|
//
|
|
|
|
// Implements:
|
2023-04-26 07:05:57 +00:00
|
|
|
//
|
|
|
|
// void rados_unset_osdmap_full_try(rados_ioctx_t io);
|
2021-06-09 04:54:52 +00:00
|
|
|
func (ioctx *IOContext) UnsetPoolFullTry() error {
|
|
|
|
if err := ioctx.validate(); err != nil {
|
|
|
|
return err
|
2020-12-09 05:46:45 +00:00
|
|
|
}
|
2021-06-09 04:54:52 +00:00
|
|
|
C.rados_unset_osdmap_full_try(ioctx.ioctx)
|
|
|
|
return nil
|
2020-12-09 05:46:45 +00:00
|
|
|
}
|