Close all open images and librados state. This cleans up watches so we
don't need to wait for them to timeout in tests.
rbd-fuse is still a rough prototype, but this makes it slightly more
usable for testing.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
return NULL;
}
+void
+rbdfs_destroy(void *unused)
+{
+ if (!gotrados)
+ return;
+ for (int i = 0; i < MAX_RBD_IMAGES; ++i) {
+ if (opentbl[i].image) {
+ rbd_close(opentbl[i].image);
+ opentbl[i].image = NULL;
+ }
+ }
+ rados_ioctx_destroy(ioctx);
+ rados_shutdown(cluster);
+}
+
// return -errno on error. fi->fh is not set until open time
int
releasedir: rbdfs_releasedir,
fsyncdir: 0,
init: rbdfs_init,
- destroy: 0,
+ destroy: rbdfs_destroy,
access: 0,
create: rbdfs_create,
/* skip unimplemented */