提交 af63bcb8 编写于 作者: J Joe Thornber 提交者: Alasdair G Kergon

dm thin metadata: decrement counter after removing mapped block

Correct the number of mapped sectors shown on a thin device's
status line by decrementing td->mapped_blocks in __remove() each time
a block is removed.
Signed-off-by: NJoe Thornber <ejt@redhat.com>
Acked-by: NMike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 4469a5f3
......@@ -1224,6 +1224,8 @@ static int __remove(struct dm_thin_device *td, dm_block_t block)
if (r)
return r;
td->mapped_blocks--;
td->changed = 1;
pmd->need_commit = 1;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册