]> git.hungrycats.org Git - linux/commit
dm thin: fix inability to discard blocks when in out-of-data-space mode
authorJoe Thornber <ejt@redhat.com>
Wed, 10 Dec 2014 17:06:57 +0000 (17:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:30:19 +0000 (10:30 -0800)
commit52259b6ce86de40f5d3aa62e9fb544bedb3e7e0a
treefb7438ccadf9c18b0d2b1316fd52c46bafb47aa3
parent5226f8886a5a1abd6af1fe9302f74cf997ff98a6
dm thin: fix inability to discard blocks when in out-of-data-space mode

commit 45ec9bd0fd7abf8705e7cf12205ff69fe9d51181 upstream.

When the pool was in PM_OUT_OF_SPACE mode its process_prepared_discard
function pointer was incorrectly being set to
process_prepared_discard_passdown rather than process_prepared_discard.

This incorrect function pointer meant the discard was being passed down,
but not effecting the mapping.  As such any discard that was issued, in
an attempt to reclaim blocks, would not successfully free data space.

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-thin.c