From: Artem Bityutskiy Date: Tue, 17 May 2011 04:46:25 +0000 (+0300) Subject: fs-tests: integck: verify truncation only if -v option was given X-Git-Tag: v1.4.5~44 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2e3553617c5717e4e223e50b7ed870d1280fd347;p=mtd-utils.git fs-tests: integck: verify truncation only if -v option was given 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 --- diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 84e3bef..2140a1b 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -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);