On 02/06/2014 04:07 PM, Josef Bacik wrote:
While trying to reproduce a delayed ref problem I noticed the box kept falling
over using all 80gb of my ram with btrfs_inode's and btrfs_delayed_node's.
Turns out this is because we only throttle delayed inode updates in
btrfs_dirty_inode, which doesn't actually get called that often, especially when
all you are doing is creating a bunch of files.  So balance delayed inode
updates everytime we create a new inode.  With this patch we no longer use up
all of our ram with delayed inode updates.  Thanks,

Signed-off-by: Josef Bacik <jba...@fb.com>
---
  fs/btrfs/extent-tree.c | 1 +
  fs/btrfs/inode.c       | 4 ++++
  2 files changed, 5 insertions(+)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9c9ecc9..1d9d9ce 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2660,6 +2660,7 @@ int btrfs_should_throttle_delayed_refs(struct 
btrfs_trans_handle *trans,
                atomic_read(&trans->transaction->delayed_refs.num_entries);
        u64 avg_runtime;

+       return 1;
        smp_mb();

Do git add for the file I want, do git commit -a anyway.

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to