]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: verify truncation only if -v option was given
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 17 May 2011 04:46:25 +0000 (07:46 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 20 May 2011 09:48:42 +0000 (12:48 +0300)
Currently we always verify holes when truncating, but we have -v switch for
this and should do this only if -v was given.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index 84e3bef82341c8138dff719171870f0d40e75077..2140a1ba0ea18ebf2911dc58541bcc0850b31315 100644 (file)
@@ -1082,7 +1082,8 @@ static void file_truncate_info(struct file_info *file, int fd,
        w->random_seed = MAX_RANDOM_SEED + 1;
        file->raw_writes = w;
 
-       if (new_length > file->length)
+       if (args.verify_ops && !args.power_cut_mode &&
+           new_length > file->length)
                file_check_hole(file, fd, file->length,
                                new_length - file->length);