diff options
author | Neil Brown <neilb@suse.de> | 2005-11-22 04:37:14 +0100 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2005-11-22 04:37:14 +0100 |
commit | f9c25f1d2af73f9494589afab42e07aa9ca2f740 (patch) | |
tree | 42ec9e4983391decabd90c24a04767aa858311ab /Build.c | |
parent | Make sure mdadm -S returns correct error code (diff) | |
download | mdadm-f9c25f1d2af73f9494589afab42e07aa9ca2f740.tar.xz mdadm-f9c25f1d2af73f9494589afab42e07aa9ca2f740.zip |
Support bitmaps with raid10
And a couple of other little things
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Build.c')
-rw-r--r-- | Build.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -58,6 +58,7 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout, mddev_dev_t dv; int bitmap_fd; unsigned long long size = ~0ULL; + unsigned long long bitmapsize; /* scan all devices, make sure they really are block devices */ for (dv = devlist; dv; dv=dv->next) { @@ -215,8 +216,9 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout, " between different architectured. Consider upgrading the Linux kernel.\n"); #endif } + bitmapsize = size>>9; /* FIXME wrong for RAID10 */ if (CreateBitmap(bitmap_file, 1, NULL, bitmap_chunk, - delay, write_behind, size>>9, major)) { + delay, write_behind, bitmapsize, major)) { return 1; } bitmap_fd = open(bitmap_file, O_RDWR); |