diff options
Diffstat (limited to 'Build.c')
-rw-r--r-- | Build.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -202,13 +202,21 @@ int Build(char *mddev, int mdfd, int chunk, int level, int layout, if (bitmap_file) { bitmap_fd = open(bitmap_file, O_RDWR); if (bitmap_fd < 0) { + int major = BITMAP_MAJOR_HI; if (bitmap_chunk == UnSet) { fprintf(stderr, Name ": %s cannot be openned.", bitmap_file); return 1; } + if (vers < 9003) { + major = BITMAP_MAJOR_HOSTENDIAN; +#ifdef __BIG_ENDIAN + fprintf(stderr, Name ": Warning - bitmaps created on this kernel are not portable\n" + " between different architectured. Consider upgrading the Linux kernel.\n"); +#endif + } if (CreateBitmap(bitmap_file, 1, NULL, bitmap_chunk, - delay, write_behind, size>>9)) { + delay, write_behind, size>>9, major)) { return 1; } bitmap_fd = open(bitmap_file, O_RDWR); |