Filipe Manana 4c469798ee btrfs: shrink the size of struct btrfs_delayed_item
Currently struct btrfs_delayed_item has a base size of 96 bytes, but its
size can be decreased by doing the following 2 tweaks:

1) Change data_len from u32 to u16. Our maximum possible leaf size is 64K,
   so the data_len can never be larger than that, and in fact it is always
   much smaller than that. The max length for a dentry's name is ensured
   at the VFS level (PATH_MAX, 4096 bytes) and in struct btrfs_inode_ref
   and btrfs_dir_item we use a u16 to store the name's length;

2) Change 'ins_or_del' to a 1 bit enum, which is all we need since it
   can only have 2 values. After this there's also no longer the need to
   BUG_ON() before using 'ins_or_del' in several places. Also rename the
   field from 'ins_or_del' to 'type', which is more clear.

These two tweaks decrease the size of struct btrfs_delayed_item from 96
bytes down to 88 bytes. A previous patch already reduced the size of this
structure by 16 bytes, but an upcoming change will increase its size by
16 bytes (adding a struct list_head element).

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-09-26 12:27:56 +02:00
..
2022-07-02 18:52:21 +09:00
2022-09-14 04:00:06 -05:00
2022-08-08 11:18:31 -07:00
2022-08-08 20:04:35 -07:00
2022-08-11 13:11:49 -07:00
2022-06-29 08:51:06 -04:00
2022-08-03 10:35:43 -07:00
2022-05-09 16:21:45 -04:00
2022-08-08 20:04:35 -07:00
2022-08-11 13:11:49 -07:00
2022-08-03 10:35:43 -07:00
2022-09-12 17:53:46 -04:00
2022-08-03 10:35:43 -07:00
2022-07-26 13:38:47 +02:00
2022-08-03 10:35:43 -07:00
2022-08-22 11:33:02 -07:00
2022-08-03 14:38:02 -07:00
2022-08-03 10:35:43 -07:00
2022-05-09 16:21:46 -04:00
2022-05-23 20:24:12 -05:00
2022-08-03 10:35:43 -07:00
2022-08-13 13:50:11 -07:00
2022-08-11 13:11:49 -07:00
2022-08-03 10:35:43 -07:00
2022-07-16 09:19:15 -04:00
2022-04-01 19:35:56 -07:00
2022-07-24 18:39:10 -06:00
2022-08-03 10:35:43 -07:00
2022-08-09 09:52:28 -07:00
2022-06-28 13:58:05 -04:00
2022-05-22 21:03:01 +01:00
2022-08-08 11:10:02 -07:00