提交 f88fd650 编写于 作者: J Josef Bacik 提交者: David Sterba

btrfs: do not increment dirty_metadata_bytes in set_btree_ioerr

We only add if we set the extent buffer dirty, and we subtract when we
clear the extent buffer dirty.  If we end up in set_btree_ioerr we have
already cleared the buffer dirty, and we aren't resetting dirty on the
extent buffer, so this is simply wrong.
Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 c4e54a65
......@@ -1911,13 +1911,6 @@ static void set_btree_ioerr(struct page *page, struct extent_buffer *eb)
*/
mapping_set_error(page->mapping, -EIO);
/*
* If we error out, we should add back the dirty_metadata_bytes
* to make it consistent.
*/
percpu_counter_add_batch(&fs_info->dirty_metadata_bytes,
eb->len, fs_info->dirty_metadata_batch);
/*
* If writeback for a btree extent that doesn't belong to a log tree
* failed, increment the counter transaction->eb_write_errors.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册