Thread (2 messages) 2 messages, 2 authors, 2009-09-15

Re: [PATCH v2 7/9] md/raid6: asynchronous handle_stripe6

flat view

From: Neil Brown <hidden>
Date: 2009-09-15 05:26:16

Sorry for the long delay in getting to these.  I week's leave recently
and that always causes tasks to pile up....

I am happy for this to  all go in this merge window.  I just have a
few nits I would like to see changed then I'll pull and push to Linus.

in this patch:
quoted hunk
 		/* now count some things */
 		if (test_bit(R5_LOCKED, &dev->flags)) s.locked++;
 		if (test_bit(R5_UPTODATE, &dev->flags)) s.uptodate++;
+		if (test_bit(R5_Wantcompute, &dev->flags))
+			BUG_ON(++s.compute > 2);
I think having a side-effect in a BUG_ON is very poor form.  I should
be able to recompile the code with BUG_ON() becoming a no-op and
everything should still work.
So something like:
quoted hunk
+		if (test_bit(R5_Wantcompute, &dev->flags)) {
+			++s.compute;
+			BUG_ON(s.compute > 2);
+		}
please.

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help