]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: reduce lock contention during extent insertion
authorChris Mason <chris.mason@oracle.com>
Fri, 27 Apr 2012 18:31:29 +0000 (14:31 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 27 Apr 2012 18:51:05 +0000 (14:51 -0400)
commitf22c6b82f093708aed8a87a285488ec349214c5e
tree97cd8b1f9d8c0682c64303d45de1fb55925abcdf
parent8bbc2d98d85c1f7df4c0b1a7c14cac5620b27037
Btrfs: reduce lock contention during extent insertion

We're spending huge amounts of time on lock contention during
end_io processing because we unconditionally assume we are overwriting
an existing extent in the file for each IO.

This checks to see if we are outside i_size, and if so, it uses a
less expensive readonly search of the btree to look for existing
extents.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/file.c