提交 e1f041e1 编写于 作者: L Liu Bo 提交者: Chris Mason

Btrfs: update to the right index of defragment

When we use autodefrag, we forget to update the index which indicates
the last page we've dirty.  And we'll set dirty flags on a same set of
pages again and again.
Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 66c26892
......@@ -1186,6 +1186,9 @@ int btrfs_defrag_file(struct inode *inode, struct file *file,
if (newer_off == (u64)-1)
break;
if (ret > 0)
i += ret;
newer_off = max(newer_off + 1,
(u64)i << PAGE_CACHE_SHIFT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册