refactor

- use bio_sectors()
- factor out prepare_new_pos()
- move "pos->mb =" on on-buffer write hit

Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>