aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-10-25 15:42:56 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:57 -0400
commitf578d4bd7e141dd03ca7e8695c1cc118c326e69e (patch)
treebb89f7548f3c537ed34ddf9d0ac71f3a6fefff85 /fs/btrfs/inode.c
parent5ee78ac70f6c01f2a5acf662c2af975665710edc (diff)
Btrfs: Optimize csum insertion to create larger items when possible
This reduces the number of calls to btrfs_extend_item and greatly lowers the cpu usage while writing large files. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 02d802cdd59b..7efc0470abf1 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -118,7 +118,7 @@ int btrfs_writepage_io_hook(struct page *page, u64 start, u64 end)
118 trans = btrfs_start_transaction(root, 1); 118 trans = btrfs_start_transaction(root, 1);
119 btrfs_set_trans_block_group(trans, inode); 119 btrfs_set_trans_block_group(trans, inode);
120 kaddr = kmap(page); 120 kaddr = kmap(page);
121 btrfs_csum_file_block(trans, root, inode->i_ino, 121 btrfs_csum_file_block(trans, root, inode, inode->i_ino,
122 start, kaddr + offset, end - start + 1); 122 start, kaddr + offset, end - start + 1);
123 kunmap(page); 123 kunmap(page);
124 ret = btrfs_end_transaction(trans, root); 124 ret = btrfs_end_transaction(trans, root);