From 60cdf39bb94303453cde2c6dd098d7ca3a21ea7d Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Wed, 9 Oct 2013 22:31:51 +0200 Subject: [PATCH] Fixes scrub with -p0. --- HISTORY | 5 +++++ configure.ac | 2 +- scrub.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index b110ffc7..18daf87a 100644 --- a/HISTORY +++ b/HISTORY @@ -1,6 +1,11 @@ SnapRAID HISTORY ================ +4.3 2013/10 +=========== + * Fixed the scrub command with the -p0 option. Now it really scrubs + only the blocks marked as bad and not the full array. + 4.2 2013/10 =========== * Fixed the wrong warning about physical offsets not supported caused diff --git a/configure.ac b/configure.ac index 859b7b98..ef02b632 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.65]) -AC_INIT([snapraid], [4.2], [], [], [http://snapraid.sourceforge.net]) +AC_INIT([snapraid], [4.3], [], [], [http://snapraid.sourceforge.net]) AM_INIT_AUTOMAKE([foreign no-dependencies -Wall]) AC_CONFIG_SRCDIR([snapraid.c]) AC_CONFIG_HEADER([config.h]) diff --git a/scrub.c b/scrub.c index ad6eab2d..829fad57 100644 --- a/scrub.c +++ b/scrub.c @@ -524,8 +524,8 @@ int state_scrub(struct snapraid_state* state, int percentage, int olderthan) timelimit = recentlimit; } } else { - /* we don't have a time limit based on quota */ - timelimit = recentlimit; + /* if we select a 0 percentage, disable also the time limit */ + timelimit = 0; } /* free the temp vector */