]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
java: remove deprecated ceph_shutdown
authorNoah Watkins <noahwatkins@gmail.com>
Thu, 25 Oct 2012 21:42:27 +0000 (14:42 -0700)
committerNoah Watkins <noahwatkins@gmail.com>
Fri, 26 Oct 2012 20:58:20 +0000 (13:58 -0700)
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
src/java/java/com/ceph/fs/CephMount.java
src/java/native/libcephfs_jni.cc
src/java/test/CephMountCreateTest.java
src/java/test/CephMountTest.java
src/java/test/CephUnmountedTest.java

index d9c6f46996354f9edaa1f944d7a45d28aaffd8dd..e8ad9d81bf2422577f307a52a052b60d9037c179 100644 (file)
@@ -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.
    *
index a06ec73671028fda02707648c780f24c8279a79f..87c6098289f7c50fbaae1f3797280cea9a97fbeb 100644 (file)
@@ -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
index 1a9c48828fe27e68132dbcdee278f21dacfe4856..e8e3a510cccb1df02844c37c2f5c935e88b42653 100644 (file)
@@ -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();
   }
 }
index 36d4309d7bffab5f378909dbea274dd60898a67e..2bf26c8ad3e124a58f348e8a0de150bed806e640 100644 (file)
@@ -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();
   }
 
   /*
index 275c5d436f329393ba6424003395465e22046fa5..8eeb2d1b23de93041ce872966abfc70d5f5364f0 100644 (file)
@@ -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();