mirror of https://github.com/ceph/go-ceph
rados: set reasonable default buf size
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
parent
573f0f1f38
commit
2b8309e816
2
ioctx.go
2
ioctx.go
|
@ -143,7 +143,7 @@ func (ioctx *IOContext) GetPoolStats() (stat PoolStat, err error) {
|
|||
|
||||
// GetPoolName returns the name of the pool associated with the I/O context.
|
||||
func (ioctx *IOContext) GetPoolName() (name string, err error) {
|
||||
buf := make([]byte, 1)
|
||||
buf := make([]byte, 128)
|
||||
for {
|
||||
ret := C.rados_ioctx_get_pool_name(ioctx.ioctx,
|
||||
(*C.char)(unsafe.Pointer(&buf[0])), C.unsigned(len(buf)))
|
||||
|
|
Loading…
Reference in New Issue