From 39335c407f054fd86eafcdaf69c1c1e654a5ee68 Mon Sep 17 00:00:00 2001 From: Tomas M Date: Thu, 4 Oct 2012 00:03:51 -0500 Subject: [PATCH] dynsize fixes --- initramfs/cleanup | 6 ++++++ livekitlib | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/initramfs/cleanup b/initramfs/cleanup index 6bd0000..858196c 100644 --- a/initramfs/cleanup +++ b/initramfs/cleanup @@ -70,6 +70,12 @@ if [ "$1" = "--init" ]; then umount -l $LINE done + # then free up loop mounts, backwards + tac /proc/mounts | grep loop | cut -d " " -f 2 | while read LINE; do + umount $LINE >/dev/console 2>&1 + umount -l $LINE + done + # and free up memory mounts, backwards tac /proc/mounts | grep memory | cut -d " " -f 2 | while read LINE; do umount $LINE >/dev/console 2>&1 diff --git a/livekitlib b/livekitlib index 4c599e5..48c8ff8 100644 --- a/livekitlib +++ b/livekitlib @@ -339,16 +339,16 @@ persistent_changes() echo "Activating dynamic sized storage for persistent changes" >&2 rm "$T1" "$T2" 2>/dev/null mount.dynsizefs "$CHANGES/changes.idx" "$CHANGES/changes.dat" "$2" - if [ "$(device_bestfs "$2/dynsize.fs")" = "" ]; then - mke2fs -b 4096 -F "$2/dynsize.fs" >/dev/null + if [ "$(device_bestfs "$2/dynsize.fs" | tr -d " ")" = "-t" ]; then + mke2fs -F "$2/dynsize.fs" >/dev/null fi mount -o loop "$2/dynsize.fs" "$2" + rmdir "$2/lost+found" else echo_green_star echo "Activating native persistent changes" >&2 mount --bind "$CHANGES" "$2" fi - } # Copy data to RAM if requested