Thread (28 messages) 28 messages, 2 authors, 2009-06-03

Re: [PATCH v2 11/11] async_tx: raid6 recovery self test

From: Dan Williams <hidden>
Date: 2009-06-03 21:42:17

On Fri, May 22, 2009 at 1:29 AM, Andre Noll [off-list ref] wrote:
On Mon, May 18, 2009 at 06:00:22PM -0700, Dan Williams wrote:
quoted
+static char disk_type(int d)
+{
+     switch (d) {
+     case NDISKS-2:
+             return 'P';
+     case NDISKS-1:
+             return 'Q';
+     default:
+             return 'D';
+     }
+}
I like this function very much because "if (disk_type(faila) == 'Q')"
is so much more readable than "if (faila == num_disks - 1)". It's a
pity that we only have it in this test module ;)
I do not see too many places outside this file where it would be
helpful... but an incremental patch for this cleanup would be welcome.
 In general this code tries to duplicate the look of
drivers/md/raid6test/test.c, so any cleanups would be applicable in
both locations.
How hard would it be to also test the fallback code for the synchronous
paths? AFAICS this test module wouldn't notice errors in the fallback
logic.
It does.  Simply omit loading an offload driver and the api will by
necessity fallback to the synchronous path.

Thanks,
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help