The patch titled

     md: allow md to load a superblock with feature-bit '1' set

has been added to the -mm tree.  Its filename is

     md-allow-md-to-load-a-superblock-with-feature-bit-1-set.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

md-make-sure-resync-gets-started-when-array-starts.patch
sunrpc-cache_register-can-use-wrong-module-reference.patch
md-fix-minor-error-in-raid10-read-balancing-calculation.patch
md-fail-io-request-to-md-that-require-a-barrier.patch
md-dont-allow-new-md-bitmap-file-to-be-set-if-one-already-exists.patch
md-improve-handling-of-bitmap-initialisation.patch
md-all-hot-add-and-hot-remove-of-md-intent-logging-bitmaps.patch
md-support-write-mostly-device-in-raid1.patch
md-add-write-behind-support-for-md-raid1.patch
md-support-md-linear-array-with-components-greater-than-2-terabytes.patch
md-raid1_quiesce-is-back-to-front-fix-it.patch
md-make-sure-bitmap_daemon_work-actually-does-work.patch
md-do-not-set-mddev-bitmap-until-bitmap-is-fully-initialised.patch
md-allow-hot-adding-devices-to-arrays-with-non-persistant-superblocks.patch
md-allow-md-to-load-a-superblock-with-feature-bit-1-set.patch
md-fix-bitmap-read_sb_page-so-that-it-handles-errors-properly.patch
drivers-md-fix-up-schedule_timeout-usage.patch



From: NeilBrown <[EMAIL PROTECTED]>

As this is used to flag an internal bitmap.

Also, introduce symbolic names for feature bits.

Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 drivers/md/md.c           |    6 +++---
 include/linux/raid/md_p.h |    5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff -puN 
drivers/md/md.c~md-allow-md-to-load-a-superblock-with-feature-bit-1-set 
drivers/md/md.c
--- 
devel/drivers/md/md.c~md-allow-md-to-load-a-superblock-with-feature-bit-1-set   
    2005-08-21 22:36:03.000000000 -0700
+++ devel-akpm/drivers/md/md.c  2005-08-21 22:36:03.000000000 -0700
@@ -876,7 +876,7 @@ static int super_1_load(mdk_rdev_t *rdev
            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) {
@@ -955,7 +955,7 @@ static int super_1_validate(mddev_t *mdd
 
                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");
@@ -1030,7 +1030,7 @@ static void super_1_sync(mddev_t *mddev,
 
        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;
diff -puN 
include/linux/raid/md_p.h~md-allow-md-to-load-a-superblock-with-feature-bit-1-set
 include/linux/raid/md_p.h
--- 
devel/include/linux/raid/md_p.h~md-allow-md-to-load-a-superblock-with-feature-bit-1-set
     2005-08-21 22:36:03.000000000 -0700
+++ devel-akpm/include/linux/raid/md_p.h        2005-08-21 22:36:03.000000000 
-0700
@@ -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 
 
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to