*/
private static synchronized native int native_ceph_release(long mountp);
- /**
- * Shutdown the mount.
- */
- public void shutdown() {
- native_ceph_shutdown(instance_ptr);
- }
-
- private static synchronized native void native_ceph_shutdown(long mountp);
-
/**
* Load configuration from a file.
*
return (_r); \
} } while (0)
-#define CHECK_MOUNTED_NORV(_c) do { \
- if (!ceph_is_mounted((_c))) { \
- THROW(env, CEPH_NOTMOUNTED_CP, "not mounted"); \
- return; \
- } } while (0)
-
/*
* Cast a jlong to ceph_mount_info. Each JNI function is expected to pass in
* the class instance variable instance_ptr. Passing a parameter is faster
return ret;
}
-/*
- * Class: com_ceph_fs_CephMount
- * Method: native_ceph_shutdown
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_ceph_fs_CephMount_native_1ceph_1shutdown
- (JNIEnv *env, jclass clz, jlong j_mntp)
-{
- struct ceph_mount_info *cmount = get_ceph_mount(j_mntp);
- CephContext *cct = ceph_get_mount_context(cmount);
-
- CHECK_MOUNTED_NORV(cmount);
-
- ldout(cct, 10) << "jni: ceph_shutdown: enter" << dendl;
-
- ceph_shutdown(cmount);
-
- ldout(cct, 10) << "jni: ceph_shutdown: exit" << dendl;
-}
-
/*
* Class: com_ceph_fs_CephMount
* Method: native_ceph_conf_set
found = true;
}
assertTrue(found);
- mount.shutdown();
+ mount.unmount();
/* changing root to empty dir */
mount = setupMount("/libcephfs_java_test_dir");
found = true;
}
assertFalse(found);
- mount.shutdown();
+ mount.unmount();
/* cleanup */
mount = setupMount(null);
mount.rmdir("/libcephfs_java_test_dir");
- mount.shutdown();
+ mount.unmount();
}
}
mount.unmount();
}
- @Test(expected=CephNotMountedException.class)
- public void test_shutdown() throws Exception {
- mount.shutdown();
- }
-
@Test(expected=CephNotMountedException.class)
public void test_statfs() throws Exception {
CephStatVFS stat = new CephStatVFS();