Re: [PATCH] RAID-6 check standalone

From
NeilBrown <hidden>
Date
2011-03-21 22:59:05
Reply to
Piergiorgio Sartor, 2011-03-21
On Mon, 21 Mar 2011 12:54:41 +0100 Piergiorgio Sartor
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
Hi Neil,

On Mon, Mar 21, 2011 at 10:04:57PM +1100, NeilBrown wrote:
quoted
On Mon, 21 Mar 2011 11:40:07 +0100 Piergiorgio Sartor
[off-list ref] wrote:

quoted
quoted
I have applied this patch to me git now - with some minor changes.
Thanks.

One question, I did not find the previous patch to "restripe.c",
which was adding the ":offset" capability. This was in order to
be able to cope with metadata 1.1 or 1.2 (offset to be determined).
I cannot seem to find it.  Please resend.
neither me, maybe I just forgot to send it.

Anyway, here below is the patch:
--- cut here ---
diff -urN a/restripe.c b/restripe.c
--- a/restripe.c	2011-02-18 23:18:20.377740868 +0100
+++ b/restripe.c	2011-02-18 23:30:07.589841525 +0100
@@ -875,6 +875,14 @@
 		exit(3);
 	}
 	for (i=0; i<raid_disks; i++) {
+		char *p;
+		p = strchr(argv[9+i], ':');
+
+		if(p != NULL) {
+			*p++ = '\0';
+			offsets[i] = atoll(p) * 512;
+		}
+			
 		fds[i] = open(argv[9+i], O_RDWR);
 		if (fds[i] < 0) {
 			perror(argv[9+i]);
OK, that's applied now.
thanks,
NeilBrown
Thread (27 messages) 27 messages, 3 authors, last reply 2011-08-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help