Add support for the OOM bias, and vmemctrl to control it.
[util-vserver.git] / scripts / vserver.functions
index e2372f7..776e487 100644 (file)
@@ -893,6 +893,22 @@ function umountVserver
     test -n "$is_ok"
 }
 
+function fsckAllFS
+{
+    local cfgdir=$1
+    local fstab="$cfgdir"/fstab
+    local FSTAB_FILE
+    local fsck_exitcode
+
+    test -e "$fstab" || return 0
+
+    export FSTAB_FILE="$fstab"
+    $_FSCK -s -n -A -T
+    fsck_exitcode=$?
+    test "$fsck_exitcode" -eq 0 -o \
+         "$fsck_exitcode" -eq 1 || return $fsck_exitcode
+}
+
 ## Usage: waitForSync <vserver> <context> <vshelper-fifo-varname>
 function initSync
 {
@@ -1275,6 +1291,6 @@ function loadDeviceMap
        vdevmap_opts=(  "${vdevmap_opts[@]}" ${flags:+--flags "$flags"} \
                        ${device:+--device "$device"} ${target:+--target "$target"} )
 
-       $_VDEVMAP --xid "$xid" "${vdevmap_opts[@]}" || return $?
+       $_VDEVMAP --xid "$xid" --set "${vdevmap_opts[@]}" || return $?
     done
 }