rebase: bump github.com/ceph/go-ceph

Bumps [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) from 0.32.1-0.20250307053135-38b9676b1d4e to 0.33.0.
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](https://github.com/ceph/go-ceph/commits/v0.33.0)

---
updated-dependencies:
- dependency-name: github.com/ceph/go-ceph
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-04-21 20:59:14 +00:00
committed by mergify[bot]
parent 3622fc4635
commit 3fa030ead1
9 changed files with 567 additions and 10 deletions

View File

@ -47,7 +47,14 @@ func (mount *MountInfo) OpenDir(path string) (*Directory, error) {
//
// int ceph_closedir(struct ceph_mount_info *cmount, struct ceph_dir_result *dirp);
func (dir *Directory) Close() error {
return getError(C.ceph_closedir(dir.mount.mount, dir.dir))
if dir.dir == nil {
return nil
}
if err := getError(C.ceph_closedir(dir.mount.mount, dir.dir)); err != nil {
return err
}
dir.dir = nil
return nil
}
// Inode represents an inode number in the file system.
@ -141,6 +148,9 @@ func toDirEntryPlus(de *C.struct_dirent, s C.struct_ceph_statx) *DirEntryPlus {
//
// int ceph_readdir_r(struct ceph_mount_info *cmount, struct ceph_dir_result *dirp, struct dirent *de);
func (dir *Directory) ReadDir() (*DirEntry, error) {
if dir.dir == nil {
return nil, errBadFile
}
var de C.struct_dirent
ret := C.ceph_readdir_r(dir.mount.mount, dir.dir, &de)
if ret < 0 {
@ -165,6 +175,9 @@ func (dir *Directory) ReadDir() (*DirEntry, error) {
func (dir *Directory) ReadDirPlus(
want StatxMask, flags AtFlags) (*DirEntryPlus, error) {
if dir.dir == nil {
return nil, errBadFile
}
var (
de C.struct_dirent
s C.struct_ceph_statx
@ -193,6 +206,9 @@ func (dir *Directory) ReadDirPlus(
//
// void ceph_rewinddir(struct ceph_mount_info *cmount, struct ceph_dir_result *dirp);
func (dir *Directory) RewindDir() {
if dir.dir == nil {
return
}
C.ceph_rewinddir(dir.mount.mount, dir.dir)
}