linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: md: bcache: Fix wrong check on can_attach_cache
@ 2013-10-15 23:37 Felipe Pena
  0 siblings, 0 replies; only message in thread
From: Felipe Pena @ 2013-10-15 23:37 UTC (permalink / raw)
  To: Kent Overstreet, Neil Brown
  Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA,
	linux-raid-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Felipe Pena

There is a wrong check on can_attach_cache() function which
bucket_size is compared to block_size value.

Signed-off-by: Felipe Pena <felipensp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/md/bcache/super.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 547c4c5..d5bc1eb 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1650,7 +1650,7 @@ err:
 static bool can_attach_cache(struct cache *ca, struct cache_set *c)
 {
 	return ca->sb.block_size	== c->sb.block_size &&
-		ca->sb.bucket_size	== c->sb.block_size &&
+		ca->sb.bucket_size	== c->sb.bucket_size &&
 		ca->sb.nr_in_set	== c->sb.nr_in_set;
 }

--
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-15 23:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 23:37 [PATCH] drivers: md: bcache: Fix wrong check on can_attach_cache Felipe Pena

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).