aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorKent Overstreet2014-02-10 17:26:40 -0800
committerKent Overstreet2014-03-18 12:22:33 -0700
commit90db6919f5f1614d1b7a92052445506bc6c564d2 (patch)
tree61e0dca7d52529ce0dd13b77c1452592ddf781b4 /drivers/md/bcache
parent487dded86ea065317aea121bec8f1816f2f235c9 (diff)
bcache: Fix discard granularity
blk_stack_limits() doesn't like a discard granularity of 0. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 5136e11eadb0..fb343276beef 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;