blk-mq: fix wrong usage of hctx->state vs hctx->flags
authorJens Axboe <axboe@fb.com>
Wed, 19 Mar 2014 21:25:02 +0000 (15:25 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:43 +0000 (12:54 -0600)
commit19221ce88a29a2d7ccf7f7cc3b6f9a6e3ca8e626
treeff6085d8e4fd878e35f62e147c75fc2de7030267
parentceeb5d0613e08748db4dcb55908191d6b30be830
blk-mq: fix wrong usage of hctx->state vs hctx->flags

BLK_MQ_F_* flags are for hctx->flags, and are non-atomic and
set at registration time. BLK_MQ_S_* flags are dynamic and
atomic, and are accessed through hctx->state.

Some of the BLK_MQ_S_STOPPED uses were wrong. Additionally,
the header file should not use a bit shift for the _S_ flags,
as they are done through the set/test_bit functions.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c
include/linux/blk-mq.h