diff options
author | Tejun Heo <tj@kernel.org> | 2018-07-18 04:47:36 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-18 08:44:14 -0600 |
commit | 3f289dcb4b265416a57ca79cf4a324060bb09060 (patch) | |
tree | 81f0e5716f6ae16f4ada210b0289bf6c1ff192db /include/linux/blkdev.h | |
parent | ada94973f15f175283fd3b8f9bfcf9de6f2cc818 (diff) | |
download | linux-stable-3f289dcb4b265416a57ca79cf4a324060bb09060.tar.gz linux-stable-3f289dcb4b265416a57ca79cf4a324060bb09060.tar.bz2 linux-stable-3f289dcb4b265416a57ca79cf4a324060bb09060.zip |
block: make bdev_ops->rw_page() take a REQ_OP instead of bool
c11f0c0b5bb9 ("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>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1939ed95f936..331a6cb8805f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1943,7 +1943,7 @@ static inline bool integrity_req_gap_front_merge(struct request *req, struct block_device_operations { int (*open) (struct block_device *, fmode_t); void (*release) (struct gendisk *, fmode_t); - int (*rw_page)(struct block_device *, sector_t, struct page *, bool); + int (*rw_page)(struct block_device *, sector_t, struct page *, unsigned int); int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); unsigned int (*check_events) (struct gendisk *disk, |