Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH md 000 of 5] Introduction
@ 2005-09-02  6:12 NeilBrown
  2005-09-02  6:12 ` [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc NeilBrown
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


5 patches for md in 2.5.13-mm1.
The first you may already have of linux-kernel.

The remainder are little bug fixes and some enhancments to the content
of /proc/mdstat.  All are suitable for early dispatch to Linus.

Thanks,
NeilBrown

 [PATCH md 001 of 5] drivers/md/raid1.c: make a function static
 [PATCH md 002 of 5] Choose better default offset for bitmap.
 [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc.
 [PATCH md 004 of 5] Add information about superblock version to /proc/mdstat
 [PATCH md 005 of 5] Report spare drives in /proc/mdstat

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

* [PATCH md 001 of 5] drivers/md/raid1.c: make a function static
  2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
  2005-09-02  6:12 ` [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc NeilBrown
  2005-09-02  6:12 ` [PATCH md 002 of 5] Choose better default offset for bitmap NeilBrown
@ 2005-09-02  6:12 ` NeilBrown
  2005-09-02  6:12 ` [PATCH md 004 of 5] Add information about superblock version to /proc/mdstat NeilBrown
  2005-09-02  6:12 ` [PATCH md 005 of 5] Report spare drives in /proc/mdstat NeilBrown
  4 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


This patch makes a needlessly global function static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Neil Brown <neilb@suse.de>

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

diff ./drivers/md/raid1.c~current~ ./drivers/md/raid1.c
--- ./drivers/md/raid1.c~current~	2005-09-02 15:59:28.000000000 +1000
+++ ./drivers/md/raid1.c	2005-09-02 15:59:34.000000000 +1000
@@ -1703,7 +1703,7 @@ static int raid1_reshape(mddev_t *mddev,
 	return 0;
 }
 
-void raid1_quiesce(mddev_t *mddev, int state)
+static void raid1_quiesce(mddev_t *mddev, int state)
 {
 	conf_t *conf = mddev_to_conf(mddev);
 

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

* [PATCH md 002 of 5] Choose better default offset for bitmap.
  2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
  2005-09-02  6:12 ` [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc NeilBrown
@ 2005-09-02  6:12 ` NeilBrown
  2005-09-02  6:12 ` [PATCH md 001 of 5] drivers/md/raid1.c: make a function static NeilBrown
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


On reflection, a better default location for hot-adding
bitmaps with version-1 superblocks is immediately after
the superblock.  There might not be much room there, but
there is usually atleast 3k, and that is a good start.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/md.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-09-02 15:59:28.000000000 +1000
+++ ./drivers/md/md.c	2005-09-02 15:59:39.000000000 +1000
@@ -957,8 +957,7 @@ static int super_1_validate(mddev_t *mdd
 		mddev->events = le64_to_cpu(sb->events);
 		mddev->bitmap_offset = 0;
 		mddev->default_bitmap_offset = 0;
-		if (mddev->minor_version == 0)
-			mddev->default_bitmap_offset = -(64*1024)/512;
+		mddev->default_bitmap_offset = 1024;
 		
 		mddev->recovery_cp = le64_to_cpu(sb->resync_offset);
 		memcpy(mddev->uuid, sb->set_uuid, 16);

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

* [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc.
  2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
@ 2005-09-02  6:12 ` NeilBrown
  2005-09-02  6:12 ` [PATCH md 002 of 5] Choose better default offset for bitmap NeilBrown
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Doh.  I want the physical hard-sector-size, not the current block size...

Signed-off-by: Neil Brown <neilb@suse.de>

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

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-09-02 15:59:39.000000000 +1000
+++ ./drivers/md/md.c	2005-09-02 15:59:46.000000000 +1000
@@ -898,7 +898,7 @@ static int super_1_load(mdk_rdev_t *rdev
 	rdev->data_offset = le64_to_cpu(sb->data_offset);
 
 	rdev->sb_size = le32_to_cpu(sb->max_dev) * 2 + 256;
-	bmask = block_size(rdev->bdev)-1;
+	bmask = queue_hardsect_size(rdev->bdev->bd_disk->queue)-1;
 	if (rdev->sb_size & bmask)
 		rdev-> sb_size = (rdev->sb_size | bmask)+1;
 

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

* [PATCH md 005 of 5] Report spare drives in /proc/mdstat
  2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
                   ` (3 preceding siblings ...)
  2005-09-02  6:12 ` [PATCH md 004 of 5] Add information about superblock version to /proc/mdstat NeilBrown
@ 2005-09-02  6:12 ` NeilBrown
  4 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Just like failed drives have (F), so spare drives now have (S).


Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/md.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-09-02 15:59:50.000000000 +1000
+++ ./drivers/md/md.c	2005-09-02 16:00:04.000000000 +1000
@@ -3334,7 +3334,8 @@ static int md_seq_show(struct seq_file *
 			if (rdev->faulty) {
 				seq_printf(seq, "(F)");
 				continue;
-			}
+			} else if (rdev->raid_disk < 0)
+				seq_printf(seq, "(S)"); /* spare */
 			size += rdev->size;
 		}
 

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

* [PATCH md 004 of 5] Add information about superblock version to /proc/mdstat
  2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
                   ` (2 preceding siblings ...)
  2005-09-02  6:12 ` [PATCH md 001 of 5] drivers/md/raid1.c: make a function static NeilBrown
@ 2005-09-02  6:12 ` NeilBrown
  2005-09-02  6:12 ` [PATCH md 005 of 5] Report spare drives in /proc/mdstat NeilBrown
  4 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-09-02  6:12 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Leave it unchanged if the original (0.90) is used, incase it might
be a compatability problem.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/md.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-09-02 15:59:46.000000000 +1000
+++ ./drivers/md/md.c	2005-09-02 15:59:50.000000000 +1000
@@ -3346,6 +3346,15 @@ static int md_seq_show(struct seq_file *
 				seq_printf(seq, "\n      %llu blocks",
 					(unsigned long long)size);
 		}
+		if (mddev->persistent) {
+			if (mddev->major_version != 0 ||
+			    mddev->minor_version != 90) {
+				seq_printf(seq," super %d.%d",
+					   mddev->major_version,
+					   mddev->minor_version);
+			}
+		} else
+			seq_printf(seq, " super non-persistent");
 
 		if (mddev->pers) {
 			mddev->pers->status (seq, mddev);

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

* [PATCH md 000 of 5] Introduction
@ 2005-10-04  5:23 NeilBrown
  0 siblings, 0 replies; 7+ messages in thread
From: NeilBrown @ 2005-10-04  5:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-raid


Following are 5 patches that start by adding sysfs support to 'md',
and then proceed to add functionality that makes use if it.

For example:
  The raid5 stripe cache can be resized with
    echo NNN > /sys/block/mdX/md/raid5/stripe_cache_size
  An array can resync'ed with
    echo repair > /sys/block/mdX/md/scan_mode

  On raid5, the number of parity mismatches found will be reported in
    /sys/block/mdX/md/mismatch_cnd

You will note that raid5 has got the most new functionality.  Matching
functionality for other md personalities will follow.

These patches should be suitable for merging after 2.6.14 is released.

NeilBrown


 [PATCH md 001 of 5] Initial sysfs support for md
 [PATCH md 002 of 5] Extend md sysfs support to component devices.
 [PATCH md 003 of 5] Add kobject/sysfs support to raid5
 [PATCH md 004 of 5] Allow a manual resync with md
 [PATCH md 005 of 5] Teach raid5 the difference between 'check' and 'repair'.

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

end of thread, other threads:[~2005-10-04  5:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-02  6:12 [PATCH md 000 of 5] Introduction NeilBrown
2005-09-02  6:12 ` [PATCH md 003 of 5] Use queue_hardsect_size instead of block_size for md superblock size calc NeilBrown
2005-09-02  6:12 ` [PATCH md 002 of 5] Choose better default offset for bitmap NeilBrown
2005-09-02  6:12 ` [PATCH md 001 of 5] drivers/md/raid1.c: make a function static NeilBrown
2005-09-02  6:12 ` [PATCH md 004 of 5] Add information about superblock version to /proc/mdstat NeilBrown
2005-09-02  6:12 ` [PATCH md 005 of 5] Report spare drives in /proc/mdstat NeilBrown
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04  5:23 [PATCH md 000 of 5] Introduction NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox