[PATCH] fs-tests: integck: lessen memory consumption

Artem Bityutskiy dedekind1 at gmail.com
Thu Mar 24 08:54:24 EDT 2011

From: Artem Bityutskiy <Artem.Bityutskiy at 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 at 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;

More information about the linux-mtd mailing list