diff options
author | Elie De Brauwer <eliedebrauwer@gmail.com> | 2013-03-01 19:37:37 +0100 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-03-11 10:33:58 +0200 |
commit | 681d1d6c311ac918986e964f65097d556b2acd78 (patch) | |
tree | 6a2064623b36cf9a70663362c8d1ced313e37c17 /tests/ubi-tests/rsvol.c | |
parent | 1145ef7ee979dde2d611e09d00fc6ff0090dcc9d (diff) |
integck.c: Only verify the operation after all datastructures have been updated
<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>
Diffstat (limited to 'tests/ubi-tests/rsvol.c')
0 files changed, 0 insertions, 0 deletions