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
Kconfig -rw-r--r-- 15.0 KB
Makefile -rw-r--r-- 2.1 KB
blktrace.c -rw-r--r-- 41.9 KB
ftrace.c -rw-r--r-- 100.2 KB
power-traces.c -rw-r--r-- 418 bytes
ring_buffer.c -rw-r--r-- 112.1 KB
ring_buffer_benchmark.c -rw-r--r-- 10.5 KB
rpm-traces.c -rw-r--r-- 474 bytes
trace.c -rw-r--r-- 117.1 KB
trace.h -rw-r--r-- 24.3 KB
trace_branch.c -rw-r--r-- 9.1 KB
trace_clock.c -rw-r--r-- 3.0 KB
trace_entries.h -rw-r--r-- 7.2 KB
trace_event_perf.c -rw-r--r-- 7.8 KB
trace_events.c -rw-r--r-- 37.2 KB
trace_events_filter.c -rw-r--r-- 50.9 KB
trace_events_filter_test.h -rw-r--r-- 1.0 KB
trace_export.c -rw-r--r-- 5.3 KB
trace_functions.c -rw-r--r-- 8.2 KB
trace_functions_graph.c -rw-r--r-- 34.9 KB
trace_irqsoff.c -rw-r--r-- 15.5 KB
trace_kdb.c -rw-r--r-- 3.0 KB
trace_kprobe.c -rw-r--r-- 31.3 KB
trace_mmiotrace.c -rw-r--r-- 9.0 KB
trace_nop.c -rw-r--r-- 2.2 KB
trace_output.c -rw-r--r-- 27.8 KB
trace_output.h -rw-r--r-- 1.6 KB
trace_printk.c -rw-r--r-- 7.6 KB
trace_probe.c -rw-r--r-- 20.3 KB
trace_probe.h -rw-r--r-- 4.6 KB
trace_sched_switch.c -rw-r--r-- 5.8 KB
trace_sched_wakeup.c -rw-r--r-- 14.0 KB
trace_selftest.c -rw-r--r-- 20.3 KB
trace_selftest_dynamic.c -rw-r--r-- 168 bytes
trace_stack.c -rw-r--r-- 8.3 KB
trace_stat.c -rw-r--r-- 8.2 KB
trace_stat.h -rw-r--r-- 973 bytes
trace_syscalls.c -rw-r--r-- 16.9 KB
trace_uprobe.c -rw-r--r-- 17.7 KB

back to top