From: Joe Thornber 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: Joe Thornber Acked-by: Mike Snitzer Cc: stable@kernel.org Signed-off-by: Alasdair G Kergon --- drivers/md/dm-thin-metadata.c | 2 ++ 1 file changed, 2 insertions(+) Index: linux-3.3-rc6/drivers/md/dm-thin-metadata.c =================================================================== --- linux-3.3-rc6.orig/drivers/md/dm-thin-metadata.c +++ linux-3.3-rc6/drivers/md/dm-thin-metadata.c @@ -1224,6 +1224,8 @@ static int __remove(struct dm_thin_devic if (r) return r; + td->mapped_blocks--; + td->changed = 1; pmd->need_commit = 1; return 0;