|
@@ -26,6 +26,11 @@
|
|
#include "raid0.h"
|
|
#include "raid0.h"
|
|
#include "raid5.h"
|
|
#include "raid5.h"
|
|
|
|
|
|
|
|
+#define UNSUPPORTED_MDDEV_FLAGS \
|
|
|
|
+ ((1L << MD_HAS_JOURNAL) | \
|
|
|
|
+ (1L << MD_JOURNAL_CLEAN) | \
|
|
|
|
+ (1L << MD_FAILFAST_SUPPORTED))
|
|
|
|
+
|
|
static int raid0_congested(struct mddev *mddev, int bits)
|
|
static int raid0_congested(struct mddev *mddev, int bits)
|
|
{
|
|
{
|
|
struct r0conf *conf = mddev->private;
|
|
struct r0conf *conf = mddev->private;
|
|
@@ -539,8 +544,7 @@ static void *raid0_takeover_raid45(struct mddev *mddev)
|
|
mddev->delta_disks = -1;
|
|
mddev->delta_disks = -1;
|
|
/* make sure it will be not marked as dirty */
|
|
/* make sure it will be not marked as dirty */
|
|
mddev->recovery_cp = MaxSector;
|
|
mddev->recovery_cp = MaxSector;
|
|
- clear_bit(MD_HAS_JOURNAL, &mddev->flags);
|
|
|
|
- clear_bit(MD_JOURNAL_CLEAN, &mddev->flags);
|
|
|
|
|
|
+ mddev_clear_unsupported_flags(mddev, UNSUPPORTED_MDDEV_FLAGS);
|
|
|
|
|
|
create_strip_zones(mddev, &priv_conf);
|
|
create_strip_zones(mddev, &priv_conf);
|
|
|
|
|
|
@@ -583,7 +587,7 @@ static void *raid0_takeover_raid10(struct mddev *mddev)
|
|
mddev->degraded = 0;
|
|
mddev->degraded = 0;
|
|
/* make sure it will be not marked as dirty */
|
|
/* make sure it will be not marked as dirty */
|
|
mddev->recovery_cp = MaxSector;
|
|
mddev->recovery_cp = MaxSector;
|
|
- clear_bit(MD_FAILFAST_SUPPORTED, &mddev->flags);
|
|
|
|
|
|
+ mddev_clear_unsupported_flags(mddev, UNSUPPORTED_MDDEV_FLAGS);
|
|
|
|
|
|
create_strip_zones(mddev, &priv_conf);
|
|
create_strip_zones(mddev, &priv_conf);
|
|
return priv_conf;
|
|
return priv_conf;
|
|
@@ -626,7 +630,7 @@ static void *raid0_takeover_raid1(struct mddev *mddev)
|
|
mddev->raid_disks = 1;
|
|
mddev->raid_disks = 1;
|
|
/* make sure it will be not marked as dirty */
|
|
/* make sure it will be not marked as dirty */
|
|
mddev->recovery_cp = MaxSector;
|
|
mddev->recovery_cp = MaxSector;
|
|
- clear_bit(MD_FAILFAST_SUPPORTED, &mddev->flags);
|
|
|
|
|
|
+ mddev_clear_unsupported_flags(mddev, UNSUPPORTED_MDDEV_FLAGS);
|
|
|
|
|
|
create_strip_zones(mddev, &priv_conf);
|
|
create_strip_zones(mddev, &priv_conf);
|
|
return priv_conf;
|
|
return priv_conf;
|