From 1bfdbe01ff300ebbf92d68c15722d2ba861aac3b Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 15 May 2006 04:21:33 +0000 Subject: Limit size of bitmap to 2million chunks. When creating a file bitmap, choose a default size that results in fewer than 2^21 chunks. Without this kmalloc failure in the kernel becomes likely. Signed-off-by: Neil Brown --- Grow.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Grow.c') diff --git a/Grow.c b/Grow.c index bc8a73f..742f656 100644 --- a/Grow.c +++ b/Grow.c @@ -329,8 +329,6 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int int d; int max_devs = st->max_devs; void *super = NULL; - if (chunk == UnSet) - chunk = DEFAULT_BITMAP_CHUNK; /* try to load a superblock */ for (d=0; d