Skip to content

Commit ea56b18

Browse files
committed
rbd: add ErrExists as standard error
Certain operations with RBD can return the C errno EEXISTS. Applications using go-ceph benefit from easily detecting this error. Signed-off-by: Niels de Vos <[email protected]>
1 parent d442b12 commit ea56b18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rbd/errors.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ var (
7373

7474
// Public general error
7575
const (
76+
// ErrExist indicates a non-specific already existing resource.
77+
ErrExist = rbdError(-C.EXISTS)
7678
// ErrNotExist indicates a non-specific missing resource.
7779
ErrNotExist = rbdError(-C.ENOENT)
7880
// ErrNotImplemented indicates a function is not implemented in by librbd.

0 commit comments

Comments
 (0)