[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 4/5] cr-ensure-disk-space: Run check_space before taking lock
This allows cr-ensure-disk-space to be a noop if there is enough space, even if run on a host which doesn't have access to the relevant lock directory. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- cr-ensure-disk-space | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cr-ensure-disk-space b/cr-ensure-disk-space index 63e92f4..2d299dd 100755 --- a/cr-ensure-disk-space +++ b/cr-ensure-disk-space @@ -61,6 +61,8 @@ sub check_space () { return $space >= logcfg('MinSpaceMby'); } +exit 0 if check_space; + my $lock = "$c{GlobalLockDir}/publish-lock"; open LOCK, "> $lock" or die "$lock $!"; flock LOCK, LOCK_EX or die $!; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |