Fix problem with terminating on unaligned sizes
authorJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 14:18:17 +0000 (15:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 14:18:17 +0000 (15:18 +0100)
commit53737ae01ca65f88089d3b8639df7be5b2f7ef0e
tree8485acd65c118e993873ca6f1a8bebbbb4ba02a4
parent638204956e6ef8f79033163667bdda94aaf9e949
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>
filesetup.c
lib/axmap.c