Jan Kara bcf62ab64d xfs: Fix overallocation in xfs_buf_allocate_memory()
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>
2012-06-21 13:38:25 -05:00
..
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-06-14 12:28:22 -05:00
2011-07-25 15:03:13 -05:00
2012-05-14 16:21:00 -05:00
2011-07-13 13:43:48 +02:00
2012-05-14 16:21:00 -05:00
2011-07-13 13:43:48 +02:00
2012-05-14 16:20:56 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2011-03-07 10:09:35 +11:00
2012-05-29 23:28:33 -04:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2012-05-14 16:21:00 -05:00
2012-05-14 16:20:54 -05:00
2012-05-14 16:21:00 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2012-05-14 16:21:00 -05:00
2012-06-14 12:28:22 -05:00
2012-05-14 16:21:00 -05:00
2012-05-28 09:54:45 -07:00
2012-03-13 17:01:15 -05:00
2011-08-12 16:21:35 -05:00
2011-08-12 16:21:35 -05:00
2012-05-14 16:21:00 -05:00
2012-05-14 16:21:00 -05:00
2012-01-03 22:55:00 -05:00
2011-08-12 16:21:35 -05:00