blk-mq: abstract tag allocation out into sbitmap library
This is a generally useful data structure, so make it available to anyone else who might want to use it. It's also a nice cleanup separating the allocation logic from the rest of the tag handling logic. The code is behind a new Kconfig option, CONFIG_SBITMAP, which is only selected by CONFIG_BLOCK for now. This should be a complete noop functionality-wise. Signed-off-by:Omar Sandoval <osandov@fb.com> Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- MAINTAINERS 1 addition, 0 deletionsMAINTAINERS
- block/Kconfig 1 addition, 0 deletionsblock/Kconfig
- block/blk-mq-tag.c 110 additions, 353 deletionsblock/blk-mq-tag.c
- block/blk-mq-tag.h 10 additions, 27 deletionsblock/blk-mq-tag.h
- block/blk-mq.c 32 additions, 80 deletionsblock/blk-mq.c
- block/blk-mq.h 0 additions, 9 deletionsblock/blk-mq.h
- include/linux/blk-mq.h 2 additions, 7 deletionsinclude/linux/blk-mq.h
- include/linux/sbitmap.h 327 additions, 0 deletionsinclude/linux/sbitmap.h
- lib/Kconfig 3 additions, 0 deletionslib/Kconfig
- lib/Makefile 2 additions, 0 deletionslib/Makefile
- lib/sbitmap.c 301 additions, 0 deletionslib/sbitmap.c
Please register or sign in to comment