From 13f76dfa927ef30d8a6ee96d33a15c2bdc593d3f Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Thu, 25 Oct 2012 14:42:27 -0700 Subject: [PATCH] java: remove deprecated ceph_shutdown Signed-off-by: Noah Watkins --- src/java/java/com/ceph/fs/CephMount.java | 9 -------- src/java/native/libcephfs_jni.cc | 26 ------------------------ src/java/test/CephMountCreateTest.java | 6 +++--- src/java/test/CephMountTest.java | 4 ++-- src/java/test/CephUnmountedTest.java | 5 ----- 5 files changed, 5 insertions(+), 45 deletions(-) diff --git a/src/java/java/com/ceph/fs/CephMount.java b/src/java/java/com/ceph/fs/CephMount.java index d9c6f4699635..e8ad9d81bf24 100644 --- a/src/java/java/com/ceph/fs/CephMount.java +++ b/src/java/java/com/ceph/fs/CephMount.java @@ -160,15 +160,6 @@ public class CephMount { */ 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. * diff --git a/src/java/native/libcephfs_jni.cc b/src/java/native/libcephfs_jni.cc index a06ec7367102..87c6098289f7 100644 --- a/src/java/native/libcephfs_jni.cc +++ b/src/java/native/libcephfs_jni.cc @@ -233,12 +233,6 @@ static void handle_error(JNIEnv *env, int rc) 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 @@ -446,26 +440,6 @@ JNIEXPORT jint JNICALL Java_com_ceph_fs_CephMount_native_1ceph_1release 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 diff --git a/src/java/test/CephMountCreateTest.java b/src/java/test/CephMountCreateTest.java index 1a9c48828fe2..e8e3a510cccb 100644 --- a/src/java/test/CephMountCreateTest.java +++ b/src/java/test/CephMountCreateTest.java @@ -66,7 +66,7 @@ public class CephMountCreateTest { found = true; } assertTrue(found); - mount.shutdown(); + mount.unmount(); /* changing root to empty dir */ mount = setupMount("/libcephfs_java_test_dir"); @@ -78,11 +78,11 @@ public class CephMountCreateTest { found = true; } assertFalse(found); - mount.shutdown(); + mount.unmount(); /* cleanup */ mount = setupMount(null); mount.rmdir("/libcephfs_java_test_dir"); - mount.shutdown(); + mount.unmount(); } } diff --git a/src/java/test/CephMountTest.java b/src/java/test/CephMountTest.java index 36d4309d7bff..2bf26c8ad3e1 100644 --- a/src/java/test/CephMountTest.java +++ b/src/java/test/CephMountTest.java @@ -56,7 +56,7 @@ public class CephMountTest { for (String l : list) System.out.println(l); mount.rmdir(basedir); - mount.shutdown(); + mount.unmount(); } /* @@ -98,7 +98,7 @@ public class CephMountTest { if (conf_file != null) mount2.conf_read_file(conf_file); mount2.mount("/wlfkjwlekfjwlejfwe"); - mount2.shutdown(); + mount2.unmount(); } /* diff --git a/src/java/test/CephUnmountedTest.java b/src/java/test/CephUnmountedTest.java index 275c5d436f32..8eeb2d1b23de 100644 --- a/src/java/test/CephUnmountedTest.java +++ b/src/java/test/CephUnmountedTest.java @@ -36,11 +36,6 @@ public class CephUnmountedTest { 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(); -- 2.47.3