From b76f82398c1017e303d87760e22125714010207f Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Mon, 7 Apr 2014 16:52:03 -0700 Subject: rbd: set the remaining discard properties to enable support max_discard_sectors must be set for the queue to support discard. Operations implementing discard for rbd zero data, so report that. Signed-off-by: Josh Durgin --- drivers/block/rbd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/block') diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index e1dcd36ae072..7712ae65753c 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3764,6 +3764,8 @@ static int rbd_init_disk(struct rbd_device *rbd_dev) queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); q->limits.discard_granularity = segment_size; q->limits.discard_alignment = segment_size; + q->limits.max_discard_sectors = segment_size / SECTOR_SIZE; + q->limits.discard_zeroes_data = 1; blk_queue_merge_bvec(q, rbd_merge_bvec); disk->queue = q; -- cgit v1.2.3