From: Josef Bacik Date: Tue, 29 May 2012 20:59:49 +0000 (-0400) Subject: Btrfs: fix return code in drop_objectid_items X-Git-Tag: v3.5-rc1~17^2~1^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bdbeb2187a99d690b374a8c5ec9911fcbcfe739;p=pandora-kernel.git Btrfs: fix return code in drop_objectid_items So dpkg fsync()'s the file and the directory containing the file whenever it writes to a file which is really slow in btrfs. This is partly because fsync()'ing a directory _always_ committed the transaction instead of just going to the tree log. This is because drop_objectid_items() would return 1 since it does a btrfs_search_slot() which returns 1. In tree-log jargon this means that we have to commit the transaction to be safe. So just check if ret is greater than 0 and set it to 0 if it does. With this patch we now use the tree-log instead of committing the entire transaction, which is twice as fast on my box. Thanks, Signed-off-by: Josef Bacik --- Reading git-diff-tree failed