summaryrefslogtreecommitdiffstats
path: root/java/com
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:18:53 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:18:53 +0100
commit9222136ac9b2e404dba128b1ac74dacaa8bf1038 (patch)
tree84d74f0c966b925c3e22bf3322256df10455d94b /java/com
parent2dc9e8a858b62830d15a8186fe575eb7903d2171 (diff)
downloadlibguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.tar.gz
libguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.tar.xz
libguestfs-9222136ac9b2e404dba128b1ac74dacaa8bf1038.zip
Generated code for drop-caches command.
Diffstat (limited to 'java/com')
-rw-r--r--java/com/redhat/et/libguestfs/GuestFS.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/java/com/redhat/et/libguestfs/GuestFS.java b/java/com/redhat/et/libguestfs/GuestFS.java
index 515fc77b..c29789c0 100644
--- a/java/com/redhat/et/libguestfs/GuestFS.java
+++ b/java/com/redhat/et/libguestfs/GuestFS.java
@@ -2487,4 +2487,29 @@ public class GuestFS {
private native void _mv (long g, String src, String dest)
throws LibGuestFSException;
+ /**
+ * drop kernel page cache, dentries and inodes
+ *
+ * This instructs the guest kernel to drop its page cache,
+ * and/or dentries and inode caches. The parameter
+ * "whattodrop" tells the kernel what precisely to drop,
+ * see <http://linux-mm.org/Drop_Caches>
+ *
+ * Setting "whattodrop" to 3 should drop everything.
+ *
+ * This automatically calls sync(2) before the operation,
+ * so that the maximum guest memory is freed.
+ *
+ * @throws LibGuestFSException
+ */
+ public void drop_caches (int whattodrop)
+ throws LibGuestFSException
+ {
+ if (g == 0)
+ throw new LibGuestFSException ("drop_caches: handle is closed");
+ _drop_caches (g, whattodrop);
+ }
+ private native void _drop_caches (long g, int whattodrop)
+ throws LibGuestFSException;
+
}