]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: store index number instead of key in struct btrfs_delayed_item
authorFilipe Manana <fdmanana@suse.com>
Wed, 17 Aug 2022 11:22:40 +0000 (12:22 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:27:56 +0000 (12:27 +0200)
commit96d89923fa9496280e3cd1d504058d99df79f22e
tree372ef98b820a5b6fa9d81d3cc5d88ea221c82cc9
parentdf4928818b307373779dfce69ffc33764d065bea
btrfs: store index number instead of key in struct btrfs_delayed_item

All delayed items are for dir index keys, so there's really no point of
having an embedded struct btrfs_key in struct btrfs_delayed_item, which
makes the structure use more space than necessary (and adds a hole of 7
bytes).

So replace the key field with an index number (u64), which reduces the
size of struct btrfs_delayed_item from 112 bytes down to 96 bytes.

Some upcoming work will increase the structure size by 16 bytes, so this
change compensates for that future size increase.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-inode.h