From 90db6919f5f1614d1b7a92052445506bc6c564d2 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 10 Feb 2014 17:26:40 -0800 Subject: bcache: Fix discard granularity blk_stack_limits() doesn't like a discard granularity of 0. Signed-off-by: Kent Overstreet diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 5136e11..fb34327 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -843,6 +843,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned block_size, q->limits.max_segment_size = UINT_MAX; q->limits.max_segments = BIO_MAX_PAGES; q->limits.max_discard_sectors = UINT_MAX; + q->limits.discard_granularity = 512; q->limits.io_min = block_size; q->limits.logical_block_size = block_size; q->limits.physical_block_size = block_size; -- cgit v0.10.2