Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139949
b: refs/heads/master
c: 2cffc4a
h: refs/heads/master
i:
  139947: 0ebe2a2
v: v3
  • Loading branch information
NeilBrown committed Mar 31, 2009
1 parent 895ca92 commit 0d18cbe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ab69ae12ceef7f23c578a3c230144e94a167a821
refs/heads/master: 2cffc4a01dd90a502324e3453d7b245d6d16e1c2
29 changes: 0 additions & 29 deletions trunk/drivers/md/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,35 +152,6 @@ config MD_RAID456

If unsure, say Y.

config MD_RAID5_RESHAPE
bool "Support adding drives to a raid-5 array"
depends on MD_RAID456
default y
---help---
A RAID-5 set can be expanded by adding extra drives. This
requires "restriping" the array which means (almost) every
block must be written to a different place.

This option allows such restriping to be done while the array
is online.

You will need mdadm version 2.4.1 or later to use this
feature safely. During the early stage of reshape there is
a critical section where live data is being over-written. A
crash during this time needs extra care for recovery. The
newer mdadm takes a copy of the data in the critical section
and will restore it, if necessary, after a crash.

The mdadm usage is e.g.
mdadm --grow /dev/md1 --raid-disks=6
to grow '/dev/md1' to having 6 disks.

Note: The array can only be expanded, not contracted.
There should be enough spares already present to make the new
array workable.

If unsure, say Y.

config MD_RAID6_PQ
tristate

Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,6 @@ static int grow_stripes(raid5_conf_t *conf, int num)
return 0;
}

#ifdef CONFIG_MD_RAID5_RESHAPE
static int resize_stripes(raid5_conf_t *conf, int newsize)
{
/* Make all the stripes able to hold 'newsize' devices.
Expand Down Expand Up @@ -1073,7 +1072,6 @@ static int resize_stripes(raid5_conf_t *conf, int newsize)
conf->pool_size = newsize;
return err;
}
#endif

static int drop_one_stripe(raid5_conf_t *conf)
{
Expand Down Expand Up @@ -4822,7 +4820,6 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
return 0;
}

#ifdef CONFIG_MD_RAID5_RESHAPE
static int raid5_check_reshape(mddev_t *mddev)
{
raid5_conf_t *conf = mddev_to_conf(mddev);
Expand Down Expand Up @@ -4967,7 +4964,6 @@ static int raid5_start_reshape(mddev_t *mddev)
md_new_event(mddev);
return 0;
}
#endif

/* This is called from the reshape thread and should make any
* changes needed in 'conf'
Expand Down Expand Up @@ -5289,11 +5285,9 @@ static struct mdk_personality raid6_personality =
.sync_request = sync_request,
.resize = raid5_resize,
.size = raid5_size,
#ifdef CONFIG_MD_RAID5_RESHAPE
.check_reshape = raid5_check_reshape,
.start_reshape = raid5_start_reshape,
.finish_reshape = raid5_finish_reshape,
#endif
.quiesce = raid5_quiesce,
.takeover = raid6_takeover,
.reconfig = raid6_reconfig,
Expand All @@ -5314,11 +5308,9 @@ static struct mdk_personality raid5_personality =
.sync_request = sync_request,
.resize = raid5_resize,
.size = raid5_size,
#ifdef CONFIG_MD_RAID5_RESHAPE
.check_reshape = raid5_check_reshape,
.start_reshape = raid5_start_reshape,
.finish_reshape = raid5_finish_reshape,
#endif
.quiesce = raid5_quiesce,
.takeover = raid5_takeover,
.reconfig = raid5_reconfig,
Expand All @@ -5340,11 +5332,9 @@ static struct mdk_personality raid4_personality =
.sync_request = sync_request,
.resize = raid5_resize,
.size = raid5_size,
#ifdef CONFIG_MD_RAID5_RESHAPE
.check_reshape = raid5_check_reshape,
.start_reshape = raid5_start_reshape,
.finish_reshape = raid5_finish_reshape,
#endif
.quiesce = raid5_quiesce,
};

Expand Down

0 comments on commit 0d18cbe

Please sign in to comment.