Bug #8197
Cannot unlink rbd images using rbd-fuse
0%
Description
rbdfs_unlink is calling find_openrbd with the wrong path. The following patch fixes it.
diff --git a/src/rbd_fuse/rbd-fuse.c b/src/rbd_fuse/rbd-fuse.c
index a13ca44..9b0e38b 100644
--- a/src/rbd_fuse/rbd-fuse.c
+++ b/src/rbd_fuse/rbd-fuse.c@ -506,7 +506,7
@ rbdfs_utime(const char *path, struct utimbuf *utime)
int
rbdfs_unlink(const char *path)
{
- int fd = find_openrbd(path);
+ int fd = find_openrbd(path+1);
if (fd != -1) {
struct rbd_openimage *rbd = &opentbl[fd];
rbd_close(rbd->image);
Associated revisions
rbd-fuse: fix unlink
The path contains a leading / that needs to be ignored.
Fixes: #8197
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
History
#1 Updated by Ian Colle almost 10 years ago
- Status changed from New to Fix Under Review
- Assignee set to Josh Durgin
Josh - please review the patch in the text
#2 Updated by Josh Durgin almost 10 years ago
- Status changed from Fix Under Review to Resolved
Thanks, added to master!