btrfs: tests: move testing members of struct btrfs_root to the end
authorDavid Sterba <dsterba@suse.com>
Fri, 17 Aug 2018 15:38:12 +0000 (17:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:34 +0000 (17:23 +0200)
The data used only for tests are better placed at the end of the
structure so that they don't change the structure layout. All new
members of btrfs_root should be placed before.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h

index f4d5eeb2be20b3f3728b767075bcbd2bc0c601d0..0e637cfc90d14564dc1000e93f7b6e2739cb89ef 100644 (file)
@@ -1202,11 +1202,6 @@ struct btrfs_root {
 
        u64 highest_objectid;
 
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
-       /* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */
-       u64 alloc_bytenr;
-#endif
-
        u64 defrag_trans_start;
        struct btrfs_key defrag_progress;
        struct btrfs_key defrag_max;
@@ -1279,6 +1274,10 @@ struct btrfs_root {
        spinlock_t qgroup_meta_rsv_lock;
        u64 qgroup_meta_rsv_pertrans;
        u64 qgroup_meta_rsv_prealloc;
+
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+       u64 alloc_bytenr;
+#endif
 };
 
 struct btrfs_file_private {