Skip to contentSkip to conversation

+ brd-add-support-for-rw_page.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Apr 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Subject: + brd-add-support-for-rw_page.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 24 Apr 2014 11:18:02 -0700

The patch titled
Subject: brd: add support for rw_page()
has been added to the -mm tree. Its filename is
brd-add-support-for-rw_page.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/brd-add-support-for-rw_page.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/brd-add-support-for-rw_page.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Matthew Wilcox <[email protected]>
Subject: brd: add support for rw_page()

Cc Dave Chinner <[email protected]>
Cc Dheeraj Reddy <[email protected]>
Cc Hugh Dickins <[email protected]>

---

 drivers/block/brd.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/block/brd.c renamed from drivers/block/brd.c~brd-add-support-for-rw_page +10 -0
diff -puN drivers/block/brd.c~brd-add-support-for-rw_page drivers/block/brd.c
@@ -360,6 +360,15 @@ out:
 	bio_endio(bio, err);
 }
 
+static int brd_rw_page(struct block_device *bdev, sector_t sector,
+		       struct page *page, int rw)
+{
+	struct brd_device *brd = bdev->bd_disk->private_data;
+	int err = brd_do_bvec(brd, page, PAGE_CACHE_SIZE, 0, rw, sector);
+	page_endio(page, rw & WRITE, err);
+	return err;
+}
+
 #ifdef CONFIG_BLK_DEV_XIP
 static int brd_direct_access(struct block_device *bdev, sector_t sector,
 			void **kaddr, unsigned long *pfn)
@@ -419,6 +428,7 @@ static int brd_ioctl(struct block_device
 
 static const struct block_device_operations brd_fops = {
 	.owner =		THIS_MODULE,
+	.rw_page =		brd_rw_page,
 	.ioctl =		brd_ioctl,
 #ifdef CONFIG_BLK_DEV_XIP
 	.direct_access =	brd_direct_access,

_

Patches currently in -mm which might be from [email protected] are

origin.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch fs-bufferc-remove-block_write_full_page_endio.patch fs-mpagec-factor-clean_buffers-out-of-__mpage_writepage.patch fs-mpagec-factor-page_endio-out-of-mpage_end_io.patch fs-block_devc-add-bdev_read_page-and-bdev_write_page.patch swap-use-bdev_read_page-bdev_write_page.patch brd-add-support-for-rw_page.patch brd-return-enospc-rather-than-enomem-on-page-allocation-failure.patch do_shared_fault-check-that-mmap_sem-is-held.patch linux-next.patch