summaryrefslogtreecommitdiff
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-05-22 13:55:15 +1000
committerNeilBrown <neilb@suse.de>2012-05-22 13:55:15 +1000
commitb405fe91e50c60c80e72d798025aea4917096421 (patch)
treebc0b8dc67e7bc7897c6299d4bc80e42a7842e7fe /drivers/md/bitmap.h
parent84e923453e19d6427c6aa884d9561f01e1425d09 (diff)
downloadlinux-rt-b405fe91e50c60c80e72d798025aea4917096421.tar.gz
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>
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r--drivers/md/bitmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index 26689260e179..e2d999a62ba9 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -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 */