[RFC 2/9] prd: add support for rw_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux