diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2013-09-29 12:01:17 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2013-09-30 11:00:38 +0800 |
commit | 3bac73108f348e303d4c898bcf6e04ad54f6b3c6 (patch) | |
tree | a345c501b5342fb1dd4ff12897eb41487818b043 | |
parent | b7b168b0d1e93e74c74ebdafa3c67eafa8646ae8 (diff) | |
download | vm-scalability-3bac73108f348e303d4c898bcf6e04ad54f6b3c6.tar.gz |
case-migrate: fix umount error
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-x | case-migrate | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/case-migrate b/case-migrate index 98b2a10..386253f 100755 --- a/case-migrate +++ b/case-migrate @@ -34,4 +34,10 @@ echo "$count * $migrate_unit bytes migrated, $usecs usecs, $throughput MB/s" kill $pid rm $SPARSE_FILE rm $PIDFILE -kill -9 $pid + +# the sleep is necessary for umount to succeed +# it takes some time to kill the usemem process +while [[ -d /proc/$pid && $(</proc/$pid/comm) = usemem ]] +do + sleep 1 +done |