Project

General

Profile

Bug #8197

Cannot unlink rbd images using rbd-fuse

Added by Shawn Edwards almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Revision 3920f40a (diff)
Added by Shawn Edwards almost 10 years ago

rbd-fuse: fix unlink

The path contains a leading / that needs to be ignored.

Fixes: #8197
Signed-off-by: Josh Durgin <>

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!

Also available in: Atom PDF