From 199171a297a87d7696b6b8c07ee520363f4603c1 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 14 Dec 2006 17:31:00 +1100 Subject: 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. --- Grow.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Grow.c') 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"); -- cgit