]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use cached state when dirtying pages during buffered write
authorFilipe Manana <fdmanana@suse.com>
Tue, 31 Oct 2017 17:59:54 +0000 (17:59 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:20 +0000 (16:08 +0100)
commitd90b5aa0f4a0c8e48c608481d37ababf9f6e752f
tree7dac357fb3b7f60089cdfe50fc70a8a6e58c9b6c
parent3e1bf0f1a1ed5651113093999b64ed364165ff74
Btrfs: use cached state when dirtying pages during buffered write

During a buffered IO write, we can have an extent state that we got when
we locked the range (if the range starts at an offset lower than eof), so
always pass it to btrfs_dirty_pages() so that setting the delalloc bit
in the range does not need to do a full search in the inode's io tree,
saving time and reducing the amount of time we hold the io tree's lock.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c