aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2009-01-05 22:43:09 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2009-01-09 01:09:47 -0500
commit0087167c9d5b1273e7e6bbe39a9ab13bdb9a39bb (patch)
treed91aa240f9e83b23b77c44d82fe976168ad882e5 /fs/xfs
parent958f8c0e4fc311e23a40635a530c01aec366a6e8 (diff)
[XFS] use scalable vmap API
Implement XFS's large buffer support with the new vmap APIs. See the vmap rewrite (db64fe02) for some numbers. The biggest improvement that comes from using the new APIs is avoiding the global KVA allocation lock on every call. Signed-off-by: Nick Piggin <npiggin@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 0b2177a9fbdc..d71dc44e21ed 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -264,7 +264,7 @@ xfs_buf_free(
264 uint i; 264 uint i;
265 265
266 if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1)) 266 if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1))
267 vunmap(bp->b_addr - bp->b_offset); 267 vm_unmap_ram(bp->b_addr - bp->b_offset, bp->b_page_count);
268 268
269 for (i = 0; i < bp->b_page_count; i++) { 269 for (i = 0; i < bp->b_page_count; i++) {
270 struct page *page = bp->b_pages[i]; 270 struct page *page = bp->b_pages[i];
@@ -386,8 +386,8 @@ _xfs_buf_map_pages(
386 bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset; 386 bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset;
387 bp->b_flags |= XBF_MAPPED; 387 bp->b_flags |= XBF_MAPPED;
388 } else if (flags & XBF_MAPPED) { 388 } else if (flags & XBF_MAPPED) {
389 bp->b_addr = vmap(bp->b_pages, bp->b_page_count, 389 bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count,
390 VM_MAP, PAGE_KERNEL); 390 -1, PAGE_KERNEL);
391 if (unlikely(bp->b_addr == NULL)) 391 if (unlikely(bp->b_addr == NULL))
392 return -ENOMEM; 392 return -ENOMEM;
393 bp->b_addr += bp->b_offset; 393 bp->b_addr += bp->b_offset;