* [PATCH] Btrfs: fix call to btrfs_search_slot in free space cache
@ 2011-08-19 20:28 Josef Bacik
0 siblings, 0 replies; only message in thread
From: Josef Bacik @ 2011-08-19 20:28 UTC (permalink / raw)
To: linux-btrfs
We are setting ins_len to 1 even tho we are just modifying an item that should
be there already. This may cause the search stuff to split nodes on the way
down needelessly. Set this to 0 since we aren't inserting anything. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/free-space-cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index d6c4dab..7912380 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -798,7 +798,7 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
key.offset = offset;
key.type = 0;
- ret = btrfs_search_slot(trans, root, &key, path, 1, 1);
+ ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
if (ret < 0) {
ret = -1;
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, bytes - 1,
--
1.7.5.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-08-19 20:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 20:28 [PATCH] Btrfs: fix call to btrfs_search_slot in free space cache Josef Bacik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).