X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=python%2Fguestfs.py;h=6c425bc2132bb961fe05ed7d5b903f81cdb0b0aa;hp=291af5d6b2203fde3dc22077b9f4bebe2480997d;hb=9222136ac9b2e404dba128b1ac74dacaa8bf1038;hpb=2dc9e8a858b62830d15a8186fe575eb7903d2171 diff --git a/python/guestfs.py b/python/guestfs.py index 291af5d..6c425bc 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -1208,3 +1208,16 @@ class GuestFS: """ return libguestfsmod.mv (self._o, src, dest) + def drop_caches (self, whattodrop): + u"""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 + + Setting "whattodrop" to 3 should drop everything. + + This automatically calls sync(2) before the operation, + so that the maximum guest memory is freed. + """ + return libguestfsmod.drop_caches (self._o, whattodrop) +