]> git.baikalelectronics.ru Git - kernel.git/commit
block: make bdev_ops->rw_page() take a REQ_OP instead of bool
authorTejun Heo <tj@kernel.org>
Wed, 18 Jul 2018 11:47:36 +0000 (04:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Jul 2018 14:44:14 +0000 (08:44 -0600)
commit874a19a45687ddf975ad8fce3858c96fde206e5d
tree81f0e5716f6ae16f4ada210b0289bf6c1ff192db
parent75c91b96c5c70ecf443905991f1f8e38b71180e3
block: make bdev_ops->rw_page() take a REQ_OP instead of bool

e4f0d7715503 ("block/mm: make bdev_ops->rw_page() take a bool for
read/write") replaced @op with boolean @is_write, which limited the
amount of information going into ->rw_page() and more importantly
page_endio(), which removed the need to expose block internals to mm.

Unfortunately, we want to track discards separately and @is_write
isn't enough information.  This patch updates bdev_ops->rw_page() to
take REQ_OP instead but leaves page_endio() to take bool @is_write.
This allows the block part of operations to have enough information
while not leaking it to mm.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/brd.c
drivers/block/zram/zram_drv.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
fs/block_dev.c
fs/mpage.c
include/linux/blkdev.h