diff options
author | David Sterba <dsterba@suse.com> | 2019-05-17 11:43:36 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-07-01 13:34:57 +0200 |
commit | 8c3e3582a4f0dbdaea49cfd71640a626c8bb7134 (patch) | |
tree | b45ec48368abc4aa5122508bc1ec2caaae5f1835 /fs/btrfs/volumes.h | |
parent | btrfs: factor out helper for counting data stripes (diff) | |
download | linux-8c3e3582a4f0dbdaea49cfd71640a626c8bb7134.tar.xz linux-8c3e3582a4f0dbdaea49cfd71640a626c8bb7134.zip |
btrfs: use u8 for raid_array members
The raid_attr table is now 7 * 56 = 392 bytes long, consisting of just
small numbers so we don't have to use ints. New size is 7 * 32 = 224,
saving 3 cachelines.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 07156d974ac4..73520a6ed90a 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -336,16 +336,16 @@ struct btrfs_device_info { }; struct btrfs_raid_attr { - int sub_stripes; /* sub_stripes info for map */ - int dev_stripes; /* stripes per dev */ - int devs_max; /* max devs to use */ - int devs_min; /* min devs needed */ - int tolerated_failures; /* max tolerated fail devs */ - int devs_increment; /* ndevs has to be a multiple of this */ - int ncopies; /* how many copies to data has */ - int nparity; /* number of stripes worth of bytes to store + u8 sub_stripes; /* sub_stripes info for map */ + u8 dev_stripes; /* stripes per dev */ + u8 devs_max; /* max devs to use */ + u8 devs_min; /* min devs needed */ + u8 tolerated_failures; /* max tolerated fail devs */ + u8 devs_increment; /* ndevs has to be a multiple of this */ + u8 ncopies; /* how many copies to data has */ + u8 nparity; /* number of stripes worth of bytes to store * parity information */ - int mindev_error; /* error code if min devs requisite is unmet */ + u8 mindev_error; /* error code if min devs requisite is unmet */ const char raid_name[8]; /* name of the raid */ u64 bg_flag; /* block group flag of the raid */ }; |