bcache: Fix discard granularity
authorKent Overstreet <kmo@daterainc.com>
Tue, 11 Feb 2014 01:26:40 +0000 (17:26 -0800)
committerKent Overstreet <kmo@daterainc.com>
Tue, 18 Mar 2014 19:22:33 +0000 (12:22 -0700)
blk_stack_limits() doesn't like a discard granularity of 0.

Signed-off-by: Kent Overstreet <kmo@daterainc.com>
drivers/md/bcache/super.c

index 5136e11..fb34327 100644 (file)
@@ -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;