Ignore:
Timestamp:
May 25, 2012, 12:50:59 AM (10 years ago)
Author:
ezyang
Message:
Drop page cache before and after futzing around with mounts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fc17-dev/host/credit-card/host.py

    r2049 r2204  
    7070    ]
    7171
     72def drop_caches():
     73    with open("/proc/sys/vm/drop_caches") as f:
     74        f.write("1")
     75
    7276def mkdir_p(path): # it's like mkdir -p
    7377    try:
     
    98102        self.types = types
    99103    def __enter__(self):
     104        drop_caches()
    100105        self.dev = "/dev/%s/%s-root" % (HOST, self.guest)
    101106
     
    121126        os.rmdir(self.mount)
    122127        shell.call("kpartx", "-d", self.dev)
     128        drop_caches()
    123129
    124130def main():
Note: See TracChangeset for help on using the changeset viewer.