Fix problem with terminating on unaligned sizes
Three separate little issues:
- Don't round up the number of blocks needed. That means we end
up with potential partial blocks, which we can never do IO to.
- Fix an axmap bug where we only check against the specific bit
in the mask, but we really want to check for "this bit or any
higher bit". This makes axmap_next_free() behave more like it
should, instead of failing way too often.
- For the almost-full case, we can return a next available bit
that is just outside the allowed range. Punt to first-free for
that case.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2 files changed