linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH md 0 of 2] Introduction
@ 2004-09-03  2:27 NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2004-09-03  2:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid

Two patches for md in 2.6.9-rc1-mm2

The first adds support for notifying user-space of events in md.

The mechanism is very simple.  A reader of /proc/mdstat can select for
"exceptional" events.  When select/poll indicates one of these, the 
reader should re-read /proc/mdstat from the top looking for changes, and then
select again.

If the reader opens for write as well (O_RDWR) (only root can do
this), then it indicates that it is prepared to take remedial action.
This is currently only relevant for multipath.  On last-drive-failure,
if there is a reader of /proc/mdstat that has an open for write, then
multipath will wait for that reader to add a new drive or take other
action before resubmitting the failed requests.

The second patch just fixes a counter in raid5/6 which could get out-by-one, and so
produce confusing messages.

(I think I sent a single item of junk just before this, sorry about that.  Please
ignore it).

NeilBrown


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH md 0 of 2] Introduction
@ 2004-11-16  4:45 NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2004-11-16  4:45 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid

Following are two patches for md/linear.c in 2.6.10-rc1-mm5

The first fixes a bug that was recently introduced, that affects linear arrays
where the components aren't all the same size (I didn't test that case :-( ).
I would be good if this was in 2.6.10.

The second is a code cleanup and minor reduction in memory usage.
There is no particular hurry for this patch to go in.

NeilBrown


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH md 2 of 2] Fix jiffies handling in md.c
  2004-12-01  0:49 [PATCH md 0 of 2] Introduction NeilBrown
  2004-12-01  0:49 ` [PATCH md 1 of 2] Fix careless bug in raid10 NeilBrown
@ 2004-12-01  0:49 ` NeilBrown
  1 sibling, 0 replies; 6+ messages in thread
From: NeilBrown @ 2004-12-01  0:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Use time_after_eq instead of >=

From: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./drivers/md/md.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2004-12-01 11:24:00.000000000 +1100
+++ ./drivers/md/md.c	2004-12-01 11:24:00.000000000 +1100
@@ -3503,7 +3503,7 @@ static void md_do_sync(mddev_t *mddev)
 			break;
 
 	repeat:
-		if (jiffies >= mark[last_mark] + SYNC_MARK_STEP ) {
+		if (time_after_eq(jiffies, mark[last_mark] + SYNC_MARK_STEP )) {
 			/* step marks */
 			int next = (last_mark+1) % SYNC_MARKS;
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH md 0 of 2] Introduction
@ 2004-12-01  0:49 NeilBrown
  2004-12-01  0:49 ` [PATCH md 1 of 2] Fix careless bug in raid10 NeilBrown
  2004-12-01  0:49 ` [PATCH md 2 of 2] Fix jiffies handling in md.c NeilBrown
  0 siblings, 2 replies; 6+ messages in thread
From: NeilBrown @ 2004-12-01  0:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Two patches for md/raid in 2.6.recent.

1/ Fix data corruption bug in raid10 when used on
   partitions.  raid10 is marked "experimental" but 
   it would be good to get this in 2.6.10
2/ Fix jiffies comparison during resync so it behaves
   correctly when jiffies wrap.  This bug has no
   performance, security, or data integrity impact.

NeilBrown

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH md 1 of 2] Fix careless bug in raid10
  2004-12-01  0:49 [PATCH md 0 of 2] Introduction NeilBrown
@ 2004-12-01  0:49 ` NeilBrown
  2004-12-01  0:49 ` [PATCH md 2 of 2] Fix jiffies handling in md.c NeilBrown
  1 sibling, 0 replies; 6+ messages in thread
From: NeilBrown @ 2004-12-01  0:49 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


raid10 performs resync by reading all blocks, comparing to look for 
differences, and over-writing blocks that were different.
The requires re-tasking a bio that was used to read, so that it can
be re-used for write.  So a number of fields need to be reset.

The bi_bdev field was not being reset. However when using on a 
partition of a device, it gets changed by generic_make_request.

This patch simply resets bi_bdev to the correct value.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>

### Diffstat output
 ./drivers/md/raid10.c |    1 +
 1 files changed, 1 insertion(+)

diff ./drivers/md/raid10.c~current~ ./drivers/md/raid10.c
--- ./drivers/md/raid10.c~current~	2004-12-01 10:58:41.000000000 +1100
+++ ./drivers/md/raid10.c	2004-12-01 10:59:18.000000000 +1100
@@ -1150,6 +1150,7 @@ static void sync_request_write(mddev_t *
 		md_sync_acct(conf->mirrors[d].rdev->bdev, tbio->bi_size >> 9);
 
 		tbio->bi_sector += conf->mirrors[d].rdev->data_offset;
+		tbio->bi_bdev = conf->mirrors[d].rdev->bdev;
 		generic_make_request(tbio);
 	}
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH md 0 of 2] Introduction
@ 2005-02-09 22:22 NeilBrown
  0 siblings, 0 replies; 6+ messages in thread
From: NeilBrown @ 2005-02-09 22:22 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid

Two more little patches for md (sorry for the dribs-and-drabs).

Feel free to leave them until post-2.6.11, though the first is really trivial
and allows md/multipath arrays be assembled (without it they just won't work).

- Fix typo for multipat assembly with will
- Mark raid6 non-experimental and tidy up bits of Kconfig

NeilBrown


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-02-09 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-01  0:49 [PATCH md 0 of 2] Introduction NeilBrown
2004-12-01  0:49 ` [PATCH md 1 of 2] Fix careless bug in raid10 NeilBrown
2004-12-01  0:49 ` [PATCH md 2 of 2] Fix jiffies handling in md.c NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2005-02-09 22:22 [PATCH md 0 of 2] Introduction NeilBrown
2004-11-16  4:45 NeilBrown
2004-09-03  2:27 NeilBrown

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).