提交 7dd5d34c 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[PATCH] md: remove inappropriate limits in md/bitmap configuration.

The kernel should not be imposing these policy limits: The time between
bitmap updates should certainly be allowed to be more than 15 seconds, and
if someone wants a bitmap chunk size in excess of 4MB, the kernel isn't the
place to stop them.
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 097426f6
...@@ -485,12 +485,12 @@ static int bitmap_read_sb(struct bitmap *bitmap) ...@@ -485,12 +485,12 @@ static int bitmap_read_sb(struct bitmap *bitmap)
else if (le32_to_cpu(sb->version) < BITMAP_MAJOR_LO || else if (le32_to_cpu(sb->version) < BITMAP_MAJOR_LO ||
le32_to_cpu(sb->version) > BITMAP_MAJOR_HI) le32_to_cpu(sb->version) > BITMAP_MAJOR_HI)
reason = "unrecognized superblock version"; reason = "unrecognized superblock version";
else if (chunksize < 512 || chunksize > (1024 * 1024 * 4)) else if (chunksize < PAGE_SIZE)
reason = "bitmap chunksize out of range (512B - 4MB)"; reason = "bitmap chunksize too small";
else if ((1 << ffz(~chunksize)) != chunksize) else if ((1 << ffz(~chunksize)) != chunksize)
reason = "bitmap chunksize not a power of 2"; reason = "bitmap chunksize not a power of 2";
else if (daemon_sleep < 1 || daemon_sleep > 15) else if (daemon_sleep < 1 || daemon_sleep > MAX_SCHEDULE_TIMEOUT / HZ)
reason = "daemon sleep period out of range (1-15s)"; reason = "daemon sleep period out of range";
else if (write_behind > COUNTER_MAX) else if (write_behind > COUNTER_MAX)
reason = "write-behind limit out of range (0 - 16383)"; reason = "write-behind limit out of range (0 - 16383)";
if (reason) { if (reason) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册