summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-12-14 17:31:00 +1100
committerNeil Brown <neilb@suse.de>2006-12-14 17:31:00 +1100
commit199171a297a87d7696b6b8c07ee520363f4603c1 (patch)
treec14892a4cca18dd1dd01539a3c39f91f28045228 /Grow.c
parent90cf1dddb25f047494b943cf2dd67ebffd42ed05 (diff)
downloadmdadm-199171a297a87d7696b6b8c07ee520363f4603c1.tar.gz
mdadm-199171a297a87d7696b6b8c07ee520363f4603c1.tar.xz
mdadm-199171a297a87d7696b6b8c07ee520363f4603c1.zip
Improve allocation and use of space for bitmaps in version1 metadata
Depending on the size of the array we reserve space for up to 128K of bitmap, and we use it where possible. When hot-adding to a version 1.0 we can still only use the 3K at the end though - need a sysfs interface to improve that. If a small chunksize is requested on Create, we don't auto-enlarge the reserved space - this still needs to be fixed.
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Grow.c b/Grow.c
index 1ab4fbc..2a13a71 100644
--- a/Grow.c
+++ b/Grow.c
@@ -305,9 +305,11 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int
if (fd2 < 0)
continue;
if (st->ss->load_super(st, fd2, &super, NULL)==0) {
- if (st->ss->add_internal_bitmap(st, super,
- chunk, delay, write_behind,
- bitmapsize, 0, major))
+ if (st->ss->add_internal_bitmap(
+ st, super,
+ &chunk, delay, write_behind,
+ bitmapsize, 0, major)
+ )
st->ss->write_bitmap(st, fd2, super);
else {
fprintf(stderr, Name ": failed to create internal bitmap - chunksize problem.\n");