fs-tests: integck: lessen memory consumption
PATCH 1/1 fs-tests: integck: lessen memory consumption
From: Artem Bityutskiy <[email protected]>
The integck test works as follows:
1. Performs many random operations and remembers what it did in small per-operatoin objects.
2. Unmounts the file-system, mounts it again, and checks that the contents of the file-system matches the stored in-memory information.
The information about write operations is stored in 'struct write_info' objects. We may end up with a huge amount of them. This patch shrinks their size by re-arraging various fields from 48 bytes to 40 bytes (on x86_64).
Signed-off-by Artem Bityutskiy <[email protected]>
--- tests/fs-tests/integrity/integck.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
tests/fs-tests/integrity/integck.c +3 -3
@@ -38,12 +38,12 @@struct write_info /* Record of random data written into a file */ { -struct write_info *next;off_t offset;/* Where in the file the data was written */ -size_t size;/* Number of bytes written */ -unsigned random_seed;/* Seed for rand() to create random data */ off_t random_offset;/* Call rand() this number of times first */ +struct write_info *next; +unsigned random_seed;/* Seed for rand() to create random data */ int trunc;/* Records a truncation (raw_writes only) */ +size_t size;/* Number of bytes written */ };struct dir_entry_info ;
Signature · 1 line
1.7.2.3