[PATCH] More random map fixes
authorJens Axboe <jens.axboe@oracle.com>
Sat, 10 Feb 2007 19:02:28 +0000 (20:02 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 10 Feb 2007 19:02:28 +0000 (20:02 +0100)
commitc685b5b2912bfbd3cdc8729d16a98438b1ff7593
tree116ebc48124aca8a9990b2440dd2a87b80ff5494
parentafdbe580a4c173cb90b079dc266229c6d4257911
[PATCH] More random map fixes

Several optimizations and fixes:

- Add ->last_free_lookup as a cache for get_next_free_offset(). No point
  in iterating known full blocks.
- Reduce number of random loops to 5 for random map lookups, fallback to
  next free block instead of wasting cpu cycles. Was 50.
- get_next_free_block() needs to take file offset into account.
- Reverse order of retrieving buflen and offset, so we can trim
  and mark properly.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.h
io_u.c