]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use integrated bitmaps for scrub_parity::dbitmap and ebitmap
authorQu Wenruo <wqu@suse.com>
Fri, 27 May 2022 07:28:18 +0000 (15:28 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:44:34 +0000 (17:44 +0200)
commit971e2e8717b0ca95cc99950b71178acea59e634b
tree123ee8d572330ef896c67f3b33747a4a5e15a486
parentc89d0432b9a493242753e3fa4c4343496274a9b9
btrfs: use integrated bitmaps for scrub_parity::dbitmap and ebitmap

Previously we use "unsigned long *" for those two bitmaps.

But since we only support fixed stripe length (64KiB, already checked in
tree-checker), "unsigned long *" is really a waste of memory, while we
can just use "unsigned long".

This saves us 8 bytes in total for scrub_parity.

To be extra safe, add an ASSERT() making sure calclulated @nsectors is
always smaller than BITS_PER_LONG.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c