* [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 ` NeilBrown
2005-09-02 6:12 ` [PATCH md 001 of 5] drivers/md/raid1.c: make a function static 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
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 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 002 of 5] Choose better default offset for bitmap NeilBrown
@ 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
` (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
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 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 ` [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 ` 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
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 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 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 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 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