[dm-devel] [PATCH] dm thin: fix pool target flags that control discard

Joe Thornber thornber at redhat.com
Mon Mar 26 15:46:26 UTC 2012


commit 1f04d92a1dd6173e38d7dc652dfe22876c40957e
Author: Joe Thornber <ejt at redhat.com>
Date:   Mon Mar 26 16:43:36 2012 +0100

    dm-thin: don't set ti->discards_supported for the pool target
    
    The pool is little more than a linear target; the default dm decision
    about whether to support discards is adequate.

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index e5a6ed4..015cdce 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1646,10 +1646,8 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
 	pt->low_water_blocks = low_water_blocks;
 	pt->pf = pf;
 	ti->num_flush_requests = 1;
-	if (pf.discard_enabled && pf.discard_passdown) {
-		ti->discards_supported = 1;
+	if (pf.discard_enabled && pf.discard_passdown)
 		ti->num_discard_requests = 1;
-	}
 	ti->private = pt;
 
 	pt->callbacks.congested_fn = pool_is_congested;




More information about the dm-devel mailing list