All of lore.kernel.org
 help / color / mirror / Atom feed
* [Drbd-dev] [patch 6/6] drbd: use copy_highpage
@ 2012-11-09  0:12 akpm
  2012-11-09  9:24 ` Philipp Reisner
  0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2012-11-09  0:12 UTC (permalink / raw)
  To: axboe; +Cc: akpm, akinobu.mita, drbd-dev

From: Akinobu Mita <akinobu.mita@gmail.com>
Subject: drbd: use copy_highpage

Use copy_highpage() to copy from one page to another.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/block/drbd/drbd_bitmap.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff -puN drivers/block/drbd/drbd_bitmap.c~drbd-use-copy_highpage drivers/block/drbd/drbd_bitmap.c
--- a/drivers/block/drbd/drbd_bitmap.c~drbd-use-copy_highpage
+++ a/drivers/block/drbd/drbd_bitmap.c
@@ -977,13 +977,8 @@ static void bm_page_io_async(struct bm_a
 	bm_set_page_unchanged(b->bm_pages[page_nr]);
 
 	if (ctx->flags & BM_AIO_COPY_PAGES) {
-		void *src, *dest;
 		page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_WAIT);
-		dest = kmap_atomic(page);
-		src = kmap_atomic(b->bm_pages[page_nr]);
-		memcpy(dest, src, PAGE_SIZE);
-		kunmap_atomic(src);
-		kunmap_atomic(dest);
+		copy_highpage(page, b->bm_pages[page_nr]);
 		bm_store_page_idx(page, page_nr);
 	} else
 		page = b->bm_pages[page_nr];
_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] [patch 6/6] drbd: use copy_highpage
  2012-11-09  0:12 [Drbd-dev] [patch 6/6] drbd: use copy_highpage akpm
@ 2012-11-09  9:24 ` Philipp Reisner
  2012-11-09  9:24   ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Reisner @ 2012-11-09  9:24 UTC (permalink / raw)
  To: akpm; +Cc: axboe, akinobu.mita, drbd-dev

Thanks, I will put it in my tree today.

Best,
 Phil
> From: Akinobu Mita <akinobu.mita@gmail.com>
> Subject: drbd: use copy_highpage
> 
> Use copy_highpage() to copy from one page to another.
> 
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/block/drbd/drbd_bitmap.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff -puN drivers/block/drbd/drbd_bitmap.c~drbd-use-copy_highpage
> drivers/block/drbd/drbd_bitmap.c ---
> a/drivers/block/drbd/drbd_bitmap.c~drbd-use-copy_highpage
> +++ a/drivers/block/drbd/drbd_bitmap.c
> @@ -977,13 +977,8 @@ static void bm_page_io_async(struct bm_a
>  	bm_set_page_unchanged(b->bm_pages[page_nr]);
> 
>  	if (ctx->flags & BM_AIO_COPY_PAGES) {
> -		void *src, *dest;
>  		page = mempool_alloc(drbd_md_io_page_pool, __GFP_HIGHMEM|__GFP_WAIT);
> -		dest = kmap_atomic(page);
> -		src = kmap_atomic(b->bm_pages[page_nr]);
> -		memcpy(dest, src, PAGE_SIZE);
> -		kunmap_atomic(src);
> -		kunmap_atomic(dest);
> +		copy_highpage(page, b->bm_pages[page_nr]);
>  		bm_store_page_idx(page, page_nr);
>  	} else
>  		page = b->bm_pages[page_nr];
> _
> _______________________________________________
> drbd-dev mailing list
> drbd-dev@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Drbd-dev] [patch 6/6] drbd: use copy_highpage
  2012-11-09  9:24 ` Philipp Reisner
@ 2012-11-09  9:24   ` Jens Axboe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2012-11-09  9:24 UTC (permalink / raw)
  To: Philipp Reisner; +Cc: akpm, akinobu.mita, drbd-dev

On 2012-11-09 10:24, Philipp Reisner wrote:
> Thanks, I will put it in my tree today.

Philip, I already queued it up in for-linus for 3.7.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-09  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09  0:12 [Drbd-dev] [patch 6/6] drbd: use copy_highpage akpm
2012-11-09  9:24 ` Philipp Reisner
2012-11-09  9:24   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.