summaryrefslogtreecommitdiffstats
path: root/include/linux/raid/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2005-11-08 21:39:32 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:56:38 -0800
commitbd926c63b7a6843d3ce2728396c0891e54fce5c4 (patch)
tree38f7083a733e9b31efe69616c5fa3448c74c1320 /include/linux/raid/bitmap.h
parentb2d444d7ad975d555bb919601bcdc0e58975a40e (diff)
downloadop-kernel-dev-bd926c63b7a6843d3ce2728396c0891e54fce5c4.zip
op-kernel-dev-bd926c63b7a6843d3ce2728396c0891e54fce5c4.tar.gz
[PATCH] md: make md on-disk bitmaps not host-endian
Current bitmaps use set_bit et.al and so are host-endian, which means not-portable. Oops. Define a new version number (4) for which bitmaps are little-endian. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid/bitmap.h')
-rw-r--r--include/linux/raid/bitmap.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index 9de9919..8994378 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -6,7 +6,13 @@
#ifndef BITMAP_H
#define BITMAP_H 1
-#define BITMAP_MAJOR 3
+#define BITMAP_MAJOR_LO 3
+/* version 4 insists the bitmap is in little-endian order
+ * with version 3, it is host-endian which is non-portable
+ */
+#define BITMAP_MAJOR_HI 4
+#define BITMAP_MAJOR_HOSTENDIAN 3
+
#define BITMAP_MINOR 39
/*
@@ -133,7 +139,8 @@ typedef __u16 bitmap_counter_t;
/* use these for bitmap->flags and bitmap->sb->state bit-fields */
enum bitmap_state {
BITMAP_ACTIVE = 0x001, /* the bitmap is in use */
- BITMAP_STALE = 0x002 /* the bitmap file is out of date or had -EIO */
+ BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */
+ BITMAP_HOSTENDIAN = 0x8000,
};
/* the superblock at the front of the bitmap file -- little endian */
OpenPOWER on IntegriCloud