md/bitmap: use set_bit, test_bit, etc for operation on bitmap->flags.
We currently use '&' and '|' which isn't the norm in the kernel and doesn't allow easy atomicity. So change to bit numbers and {set,clear,test}_bit. This allows us to remove a spinlock/unlock (which was dubious anyway) and some other simplifications. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
@@ -111,9 +111,9 @@ typedef __u16 bitmap_counter_t;
|
||||
|
||||
/* use these for bitmap->flags and bitmap->sb->state bit-fields */
|
||||
enum bitmap_state {
|
||||
BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */
|
||||
BITMAP_WRITE_ERROR = 0x004, /* A write error has occurred */
|
||||
BITMAP_HOSTENDIAN = 0x8000,
|
||||
BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */
|
||||
BITMAP_WRITE_ERROR = 2, /* A write error has occurred */
|
||||
BITMAP_HOSTENDIAN =15,
|
||||
};
|
||||
|
||||
/* the superblock at the front of the bitmap file -- little endian */
|
||||
|
Reference in New Issue
Block a user