https://github.com/torvalds/linux
Revision 59c84ed0ddc11f1823b4a33ace4fbcc948261bb2 authored by Jan Kara on 05 June 2012, 22:32:26 UTC, committed by Ben Myers on 21 June 2012, 19:20:36 UTC
Commit de1cbee which removed b_file_offset in favor of b_bn introduced a bug
causing xfs_buf_allocate_memory() to overestimate the number of necessary
pages. The problem is that xfs_buf_alloc() sets b_bn to -1 and thus effectively
every buffer is straddling a page boundary which causes
xfs_buf_allocate_memory() to allocate two pages and use vmalloc() for access
which is unnecessary.

Dave says xfs_buf_alloc() doesn't need to set b_bn to -1 anymore since the
buffer is inserted into the cache only after being fully initialized now.
So just make xfs_buf_alloc() fill in proper block number from the beginning.

CC: David Chinner <dchinner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
1 parent 76d0953
History
Tip revision: 59c84ed0ddc11f1823b4a33ace4fbcc948261bb2 authored by Jan Kara on 05 June 2012, 22:32:26 UTC
xfs: Fix overallocation in xfs_buf_allocate_memory()
Tip revision: 59c84ed
File Mode Size
Makefile -rw-r--r-- 776 bytes
auto_group.c -rw-r--r-- 5.6 KB
auto_group.h -rw-r--r-- 1.5 KB
clock.c -rw-r--r-- 8.0 KB
core.c -rw-r--r-- 195.9 KB
cpupri.c -rw-r--r-- 6.7 KB
cpupri.h -rw-r--r-- 791 bytes
debug.c -rw-r--r-- 11.9 KB
fair.c -rw-r--r-- 131.0 KB
features.h -rw-r--r-- 1.9 KB
idle_task.c -rw-r--r-- 2.1 KB
rt.c -rw-r--r-- 46.4 KB
sched.h -rw-r--r-- 29.5 KB
stats.c -rw-r--r-- 2.7 KB
stats.h -rw-r--r-- 6.6 KB
stop_task.c -rw-r--r-- 2.2 KB

back to top