Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8324
b: refs/heads/master
c: 71c0805
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Sep 9, 2005
1 parent 5452ea2 commit 5e5a11b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b1e35f6d666693e8f376ce02242efca3ec09aaf
refs/heads/master: 71c0805cb48462c99fbe0e5fcc6c12d7b9929c09
6 changes: 3 additions & 3 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ static int super_1_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev, int minor_version)
sb->major_version != cpu_to_le32(1) ||
le32_to_cpu(sb->max_dev) > (4096-256)/2 ||
le64_to_cpu(sb->super_offset) != (rdev->sb_offset<<1) ||
sb->feature_map != 0)
(le32_to_cpu(sb->feature_map) & ~MD_FEATURE_ALL) != 0)
return -EINVAL;

if (calc_sb_1_csum(sb) != sb->sb_csum) {
Expand Down Expand Up @@ -954,7 +954,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)

mddev->max_disks = (4096-256)/2;

if ((le32_to_cpu(sb->feature_map) & 1) &&
if ((le32_to_cpu(sb->feature_map) & MD_FEATURE_BITMAP_OFFSET) &&
mddev->bitmap_file == NULL ) {
if (mddev->level != 1) {
printk(KERN_WARNING "md: bitmaps only supported for raid1\n");
Expand Down Expand Up @@ -1029,7 +1029,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)

if (mddev->bitmap && mddev->bitmap_file == NULL) {
sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset);
sb->feature_map = cpu_to_le32(1);
sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET);
}

max_dev = 0;
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/raid/md_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,10 @@ struct mdp_superblock_1 {
__u16 dev_roles[0]; /* role in array, or 0xffff for a spare, or 0xfffe for faulty */
};

/* feature_map bits */
#define MD_FEATURE_BITMAP_OFFSET 1

#define MD_FEATURE_ALL 1

#endif

0 comments on commit 5e5a11b

Please sign in to comment.