Commit Graph

10 Commits

Author SHA1 Message Date
Riya Singhal 2852a13c88 cephfs: made ENOENT a public error
this commit renames ErrNoEntry of cephfs
to ErrNotExist and making it public allowing
other projects to access this.

Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2023-11-09 15:10:14 +00:00
John Mulligan 528893ce1d cephfs: clean up symlink created in TestSymlink func
Add a defer to clean up the symlink created by the test.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-08-31 17:51:58 +02:00
John Mulligan f0142920b5 cephfs: remove uses of external mount of test fs
The external mount point was mainly used for stat prior to a Stat
function being part of go-ceph's cephfs package. Now that we have
Statx, we can replace the need for the external mount and os.Stat.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-03-21 06:19:40 +00:00
Sven Anderson 527553718c cephfs: add a missing userMount() to tests
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-03-05 04:30:30 +00:00
John Mulligan 36abb07dc5 cephfs: add a test case for calling Statx on an invalid mount
Adding this test case gets test coverage to 100% for path.go.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-11-30 15:39:09 +00:00
John Mulligan 7cbacf9331 cephfs: add Truncate implementing ceph_truncate
Add a Truncate method that operates on paths.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-11-30 15:39:09 +00:00
John Mulligan 3a561218d4 cephfs: add Rename function
Rename, it does what it says on the tin. Tests included.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-06-15 13:59:27 -04:00
John Mulligan d4079e3949 cephfs: add path based Statx function implmenting ceph_statx
Add a Statx wrapper for ceph_statx.
Add a type wrapping the statx status info that exposes the various
fields from the C-struct.
Add a type wrapping struct timespec, based on golang's x/sys, for the
time fields in the struct.
Note that the ceph struct is not the same as the linux statx struct.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-05-07 13:44:19 -04:00
muagarwa 9e43e5119d cephfs: adding Link, Symlink and Readlink functions
Link function implements ceph_link().
Symlink function implements ceph_symlink().
Readlink function implements ceph_readlink().
To fix https://github.com/ceph/go-ceph/issues/218

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-04-30 13:28:51 -04:00
John Mulligan bbf5fecf90 cephfs: split basic path management funcs into new files
Continue organizing the cephfs functionality by creating new files
for the most basic path management functions:
  MakeDir, RemoveDir, ChangeDir, CurrentDir
Similarly, the dedicated test functions for those items are moved into
a new file as well.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-04-17 13:40:01 -04:00