Commit Graph

6 Commits

Author SHA1 Message Date
Zach Brown
c87a9f3a07 scoutfs-utils: resurrect bitops
We've had these in the past and we need them again for the block
allocator item bitmaps.

Signed-off-by: Zach Brown <zab@versity.com>
2020-01-17 11:22:04 -08:00
Zach Brown
e81c256a22 Remove the bitops helpers
We don't have any use for the bitops today, we'll resurrect this in
simpler form if it's needed again.

Signed-off-by: Zach Brown <zab@versity.com>
2017-04-18 14:20:43 -07:00
Zach Brown
40b9f19ec4 Add bitops.c for find_next_bit_le()
The upcoming buddy changes are going to need a find_next_bit_le().

Signed-off-by: Zach Brown <zab@versity.com>
2016-11-04 14:16:25 -07:00
Zach Brown
99167f6d66 Expand little endian bitops functions
We had the start of functions that operated on little endian bitmaps.
This adds more operations and uses __packed to support unaligned bitmaps
on platforms where unaligned accesses are a problem.

Signed-off-by: Zach Brown <zab@versity.com>
2016-07-27 13:50:51 -07:00
Zach Brown
ddf5ef1017 Fix set_bit_le() type width problems
The swizzle value was defined in terms of longs but the code used u64s.
And the bare shifted value was an int so it'd get truncated.  Switch it
all to using longs.

The ratio of bugs to lines of code in that first attempt was through the
roof!

Signed-off-by: Zach Brown <zab@versity.com>
2016-03-23 22:21:11 -04:00
Zach Brown
8471134328 Add trivial set_bit_le in bitops.h
We're going to need to start setting bloom filters bits in mkfs so we'll
add this trivial inline.  It might grow later.

Signed-off-by: Zach Brown <zab@versity.com>
2016-03-23 14:00:07 -07:00