Commit Graph

3 Commits (a9ce9286f24b299ea2a8465d89cee659c3f5dcf1)

Author SHA1 Message Date
Nikolay Borisov a9ce9286f2 btrfs-progs: Implement find_*_bit_le operations
This commit introduces explicit little endian bit operations. The only
difference with the existing bitops implementation is that bswap(32|64)
is called when the _le versions are invoked on a big-endian machine.
This is in preparation for adding free space tree conversion support.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 15:51:17 +02:00
Nikolay Borisov aa3088632a btrfs-progs: Replace homegrown bitops related functions with kernel counterparts
Replace existing find_*_bit functions with kernel equivalent. This
reduces duplication, simplifies the code (we really have one worker
function _find_next_bit) and is quite likely faster. No functional
changes.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 15:49:17 +02:00
David Sterba 90969c8897 btrfs-progs: move bitops.h to kernel-lib
Forgotten when the rest got moved.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-24 13:06:36 +01:00