]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: shrink file_info structure size
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 11 Apr 2011 10:07:26 +0000 (13:07 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 18 Apr 2011 14:44:44 +0000 (17:44 +0300)
We do not have to store boolean flags in 'int' variables which
consume 4 bytes each, we can store those in bit-fields instead.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
tests/fs-tests/integrity/integck.c

index c00e67ed0197bfd603fa681a2b2056f628269693..f203e3ab32f3946706d806ca9f219ce6ca9ca43f 100644 (file)
@@ -58,10 +58,10 @@ struct file_info /* Each file has one of these */
                                /* Record in order all writes to the file */
        struct fd_info *fds; /* All open file descriptors for this file */
        struct dir_entry_info *links;
-       int link_count;
        off_t length;
-       int deleted; /* File has been deleted but is still open */
-       int no_space_error; /* File has incurred a ENOSPC error */
+       int link_count;
+       unsigned int deleted:1; /* File has been deleted but is still open */
+       unsigned int no_space_error:1; /* File has incurred a ENOSPC error */
        uint64_t check_run_no; /* Run number used when checking */
 };