[PATCH 1/4] integck.c: Only verify the operation after all datastructures have been updated

Elie De Brauwer
2013-03-01T18:38:02Z

tests/fs-tests/integrity/integck.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 087a18b..2c6ffea 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -960,9 +960,6 @@ static void file_write_info(struct file_info *file, int fd, off_t offset,
w->random_seed = seed;
file->raw_writes = w;

- if (args.verify_ops && !args.power_cut_mode)
- file_check_data(file, fd, new_write);
-
/* Insert it into file->writes */
inserted = 0;
end = offset + size;
@@ -1028,6 +1025,9 @@ static void file_write_info(struct file_info *file, int fd, off_t offset,
/* Update file length */
if (end > file->length)
file->length = end;
+
+ if (args.verify_ops && !args.power_cut_mode)
+ file_check_data(file, fd, new_write);
}

/* Randomly select offset and and size to write in a file */
--
1.7.10.4