Re: [PATCH] bcache/md: Use raid stripe size
From: Mike Snitzer <hidden>
Date: 2014-01-07 02:04:48
Also in:
lkml
On Wed, Dec 18, 2013 at 8:12 PM, Kent Overstreet [off-list ref] wrote:
Now that we've got code for raid5/6 stripe awareness, bcache just needs to know about the stripes and when writing partial stripes is expensive - we probably don't want to enable this optimization for raid1 or 10, even though they have stripes. So add a flag to queue_limits. Signed-off-by: Kent Overstreet <redacted> --- This is in my pile of bcache stuff queued up for 3.14 - if no one objects it'll be in my bcache pull request: drivers/md/bcache/super.c | 6 ++++++ drivers/md/raid5.c | 1 + include/linux/blkdev.h | 1 + 3 files changed, 8 insertions(+)
Hi Kent,
quoted hunk ↗ jump to hunk
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 02cb6f0ea7..0375654adb 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h@@ -291,6 +291,7 @@ struct queue_limits { unsigned char discard_misaligned; unsigned char cluster; unsigned char discard_zeroes_data; + unsigned char raid_partial_stripes_expensive; }; struct request_queue {
If you add a new member to queue_limits you need to update blk_stack_limits() so that it propagates as you stack devices. You probably also want to update blk_set_default_limits. Mike