]> 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)
commit62eca7b874f883f272672f31300ea6fe2634f6b8
tree123ee8d572330ef896c67f3b33747a4a5e15a486
parent658d01cffa533e466bc1b4229108225ce041c50f
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