<quote>
integck: File Data:
integck: Offset: 0 Size: 196 Seed:
5999877 R.Off: 0
integck: Offset: 196 Size: 33 Seed:
4160795 R.Off: 0
integck: Offset: 229 Size: 1252 Seed:
8070052 R.Off: 0
integck: Offset: 1481 Size: 612 Seed:
4160795 R.Off: 1285
integck: Offset: 2093 Size: 6 Seed:
6946586 R.Off: 0
integck: Offset: 2099 Size: 536 Seed:
4160795 R.Off: 1903
integck: Offset: 2635 Size: 1562 Seed:
9845455 R.Off: 0
integck: Offset: 4197 Size: 80 Seed: 702818 R.Off: 0
integck: Offset: 4277 Size: 115 Seed:
9845455 R.Off: 1642
integck: 9 writes
integck: ============================================
integck: Write Info:
integck: Offset: 826 Size: 357 Seed:
5908448 R.Off: 0
integck: Offset: 4197 Size: 80 Seed: 702818 R.Off: 0
...
</quote>
And I would expect the file data listing to include at offset 826 something
with a size of 357 and a seed of
5908448. Clearly it is not there (which
is already extremely confusing). The point is that file_write_info first
updates the raw_write, then verifies the data (passing the new write)
and only after that updates the write structure. But in file_check_data
only the newly written data is verified (passed as an argument) whilst
the save_file() function to dump the file uses the raw_writes to recreate
the written data (while raw_writes is only updated after after this check
would have succeeded). Several lines to say that in this patch the verify
only gets called _after_ the datastructures are updated.
Signed-off-by: Elie De Brauwer <eliedebrauwer@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
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;
/* 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 */