fs-tests: integck: lessen memory consumption

Message ID 1300971264-7352-1-git-send-email-dedekind1@gmail.com
State New, archived
Headers show

Commit Message

Artem Bityutskiy March 24, 2011, 12:54 p.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

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

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 <Artem.Bityutskiy@nokia.com>
 tests/fs-tests/integrity/integck.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 145557f..f763031 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -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;