diff --git a/docu/mars-user-manual.lyx b/docu/mars-user-manual.lyx index dd9ccb50..00e2be41 100644 --- a/docu/mars-user-manual.lyx +++ b/docu/mars-user-manual.lyx @@ -35486,6 +35486,35 @@ df \begin_layout Labeling \labelwidthstring 00.00.0000 +\family typewriter +total-space +\family default + (available since mars0.1astable140, global, no resource argument necessary) + Shows the +\emph on +logically present +\emph default + space in +\family typewriter +/mars/ +\family default +, which may deviate from the physically available space as indicated by + the +\family typewriter +df +\family default + command. + Similarly to +\family typewriter +rest-space +\family default + but independently from it, this is also safeguarded and rounded down. + Computational details may change in future MARS releases. +\end_layout + +\begin_layout Labeling +\labelwidthstring 00.00.0000 + \family typewriter get-{disk,device} \family default diff --git a/kernel/sy_old/mars_main.c b/kernel/sy_old/mars_main.c index cdbbaaf7..68e35f4f 100644 --- a/kernel/sy_old/mars_main.c +++ b/kernel/sy_old/mars_main.c @@ -654,6 +654,7 @@ int compute_emergency_mode(void) present = raw_total_space - limit; global_total_space = present; + __make_alivelink("total-space", present / (1024 * 1024), true); if (mars_throttle_start > 0 && mars_throttle_end > mars_throttle_start && diff --git a/userspace/marsadm b/userspace/marsadm index dba31555..92dc57e4 100755 --- a/userspace/marsadm +++ b/userspace/marsadm @@ -6103,7 +6103,7 @@ sub link_purge_global { # only when a new kernel is running if (defined($kernel_compat) && $kernel_compat ne "") { my $keep_hours = 0; - my $glob = "{alive,buildtag,emergency,features,rest-space,time,tree,usable,used,compat-alivelinks}"; + my $glob = "{alive,buildtag,emergency,features,{rest,total}-space,time,tree,usable,used,compat-alivelinks}"; # Notice: $kernel_compat might differ from $compat_alivelinks # For example, this can happen temporarily during join-cluster & co if (!$kernel_compat) { @@ -8141,7 +8141,7 @@ sub eval_fn { $lnk = correct_path($lnk); return get_link($lnk, 1); } - if (/^(tree|rest-space)$/) { + if (/^(tree|(rest|total)-space)$/) { my $what = $1; return get_alive_link($what, $$env{"host"}, 1) } @@ -9207,7 +9207,7 @@ my %trivial_globs = => "", "is-{member,guest}" => "", - "rest-space" + "{rest,total}-space" => "", "get-{disk,device}" => "",