linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
To: NeilBrown <neilb@suse.de>
Cc: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>,
	linux-raid@vger.kernel.org
Subject: Re: [PATCH] Re: User space RAID-6 access
Date: Wed, 9 Feb 2011 19:47:34 +0100	[thread overview]
Message-ID: <20110209184734.GA7169@lazy.lzy> (raw)
In-Reply-To: <20110208094952.49745c7b@notabene.brown>

> I have applied some patch - with some formatting changes to make it consistent
> with the rest of the code.
> 
> I don't really have time to look more deeply at it at the moment.
> Maybe someone else will?...

Hi Neil,

thanks for including this in git.

Actually I did it look at it :-) and I already found a
couple of issues, below is a small fix patch.

One question about offsets.
I noticed that offsets seems to be defined per component,
in the md software stack.
I mean, looking at sysfs, the offset are inside md/dev-sdX/offset
or available with mdadm -E /dev/sdX
It seems possible that different components have different
offset (I can imagine this happening with different sizes).

Now, from inside "test_stripe" there is no information about
the RAID itself, I mean the device, nor about the metadata type.

What would be the best way to get the offsets inside "restripe.c"?

1) popen "mdadm -E ..." and grep the "Data Offset" field.
2) pass one single offset as command line parameter.
3) add the whole md device as command line parameter, removing
the single devices, and use sysfs.

Thanks for any advice,

bye,

pg


diff -uN a/restripe.c b/restripe.c
--- a/restripe.c	2011-02-09 19:31:18.989495816 +0100
+++ b/restripe.c	2011-02-09 19:32:42.597955058 +0100
@@ -430,7 +430,8 @@
 
 
 		if((Px != 0) && (Qx != 0)) {
-			data_id = (raid6_gflog[Qx] - raid6_gflog[Px]) & 0xFF;
+			data_id = (raid6_gflog[Qx] - raid6_gflog[Px]);
+			if(data_id < 0) data_id += 255;
 			diskD = geo_map(data_id, start/chunk_size,
 					data_disks + 2, level, layout);
 			curr_broken_disk = diskD;
@@ -439,6 +440,9 @@
 		if((Px == 0) && (Qx == 0))
 			curr_broken_disk = curr_broken_disk;
 
+		if(curr_broken_disk >= data_disks + 2)
+			broken_status = 2;
+
 		switch(broken_status) {
 		case 0:
 			if(curr_broken_disk != -1) {
@@ -450,10 +454,6 @@
 		case 1:
 			if(curr_broken_disk != prev_broken_disk)
 				broken_status = 2;
-
-			if(curr_broken_disk >= data_disks + 2)
-				broken_status = 2;
-
 			break;
 
 		case 2:
 
bye,

-- 

piergiorgio

  reply	other threads:[~2011-02-09 18:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31 20:20 User space RAID-6 access Piergiorgio Sartor
2011-01-31 20:52 ` NeilBrown
2011-02-01 19:21   ` Piergiorgio Sartor
2011-02-01 20:14     ` John Robinson
2011-02-01 20:18     ` NeilBrown
2011-02-01 21:00       ` Piergiorgio Sartor
2011-02-05 17:33   ` Piergiorgio Sartor
2011-02-05 20:58     ` NeilBrown
2011-02-07 22:24       ` [PATCH] " Piergiorgio Sartor
2011-02-07 22:49         ` NeilBrown
2011-02-09 18:47           ` Piergiorgio Sartor [this message]
2011-02-17  6:23             ` NeilBrown
2011-02-17 20:01               ` Piergiorgio Sartor
2011-02-18 23:02               ` Piergiorgio Sartor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110209184734.GA7169@lazy.lzy \
    --to=piergiorgio.sartor@nexgo.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).