From: Nick Piggin <npiggin@suse.de>
To: Linux Memory Management List <linux-mm@kvack.org>,
xfs@oss.sgi.com, xen-devel@lists.xensource.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
dri-devel@lists.sourceforge.net
Subject: [rfc][patch 3/3] xfs: use new vmap API
Date: Mon, 28 Jul 2008 14:37:03 +0200 [thread overview]
Message-ID: <20080728123703.GC13926@wotan.suse.de> (raw)
In-Reply-To: <20080728123438.GA13926@wotan.suse.de>
Implement XFS's large buffer support with the new vmap APIs. See the vmap
rewrite patch for some numbers.
Signed-off-by: Nick Piggin <npiggin@suse.de>
---
Index: linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_buf.c
+++ linux-2.6/fs/xfs/linux-2.6/xfs_buf.c
@@ -265,7 +265,7 @@ xfs_buf_free(
uint i;
if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1))
- vunmap(bp->b_addr - bp->b_offset);
+ vm_unmap_ram(bp->b_addr - bp->b_offset, bp->b_page_count);
for (i = 0; i < bp->b_page_count; i++) {
struct page *page = bp->b_pages[i];
@@ -387,8 +387,8 @@ _xfs_buf_map_pages(
bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset;
bp->b_flags |= XBF_MAPPED;
} else if (flags & XBF_MAPPED) {
- bp->b_addr = vmap(bp->b_pages, bp->b_page_count,
- VM_MAP, PAGE_KERNEL);
+ bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count,
+ -1, PAGE_KERNEL);
if (unlikely(bp->b_addr == NULL))
return -ENOMEM;
bp->b_addr += bp->b_offset;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-07-28 12:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 12:34 [rfc][patch 1/3] mm: vmap rewrite Nick Piggin
2008-07-28 12:36 ` [rfc][patch 2/3] xfs: remove vmap cache Nick Piggin
2008-08-04 6:23 ` Lachlan McIlroy
2008-07-28 12:37 ` Nick Piggin [this message]
2008-08-04 6:28 ` [rfc][patch 3/3] xfs: use new vmap API Lachlan McIlroy
2008-08-04 10:57 ` Nick Piggin
2008-08-05 1:43 ` Lachlan McIlroy
2008-08-05 2:05 ` Nick Piggin
2008-07-28 23:34 ` [rfc][patch 1/3] mm: vmap rewrite Robin Holt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080728123703.GC13926@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=dri-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xen-devel@lists.xensource.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox