From: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> Based on commit a72132c31d58 brd: add support for rw_page() Signed-off-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> --- drivers/block/prd.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/block/prd.c b/drivers/block/prd.c index 7684197..4cfc4f8 100644 --- a/drivers/block/prd.c +++ b/drivers/block/prd.c @@ -185,6 +185,16 @@ out: bio_endio(bio, err); } +static int prd_rw_page(struct block_device *bdev, sector_t sector, + struct page *page, int rw) +{ + struct prd_device *prd = bdev->bd_disk->private_data; + + prd_do_bvec(prd, page, PAGE_CACHE_SIZE, 0, rw, sector); + page_endio(page, rw & WRITE, 0); + return 0; +} + static long prd_direct_access(struct block_device *bdev, sector_t sector, void **kaddr, unsigned long *pfn, long size) { @@ -201,6 +211,7 @@ static long prd_direct_access(struct block_device *bdev, sector_t sector, static const struct block_device_operations prd_fops = { .owner = THIS_MODULE, + .rw_page = prd_rw_page, .direct_access = prd_direct_access, }; -- 1.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>