浏览代码

Btrfs: free csums when we're done scrubbing an extent

A user reported scrub taking up an unreasonable amount of ram as it ran.  This
is because we lookup the csums for the extent we're scrubbing but don't free it
up until after we're done with the scrub, which means we can take up a whole lot
of ram.  This patch fixes this by dropping the csums once we're done with the
extent we've scrubbed.  The user reported this to fix their problem.  Thanks,

Reported-and-tested-by: Remco Hosman <remco@hosman.xs4all.nl>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Josef Bacik 12 年之前
父节点
当前提交
d88d46c6e0
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/btrfs/scrub.c

+ 1 - 0
fs/btrfs/scrub.c

@@ -2505,6 +2505,7 @@ again:
 			if (ret)
 				goto out;
 
+			scrub_free_csums(sctx);
 			if (extent_logical + extent_len <
 			    key.objectid + bytes) {
 				logical += increment;