pr_err("No active reshape to revert on %s\n",
devname);
else if (sb->delta_disks == 0)
pr_err("No active reshape to revert on %s\n",
devname);
else if (sb->delta_disks == 0)
+
+ if (sb->level >= 4 && sb->level <= 6 &&
+ sb->reshape_position % (
+ sb->new_chunk/512 *
+ (sb->raid_disks - sb->delta_disks - parity))) {
+ pr_err("Reshape position is not suitably aligned.\n");
+ pr_err("Try normal assembly as stop again\n");
+ return -2;
+ }
static int init_super0(struct supertype *st, mdu_array_info_t *info,
unsigned long long size, char *ignored_name, char *homehost,
int *uuid, unsigned long long data_offset)
static int init_super0(struct supertype *st, mdu_array_info_t *info,
unsigned long long size, char *ignored_name, char *homehost,
int *uuid, unsigned long long data_offset)
if (super->state & (1<<MD_SB_BITMAP_PRESENT)) {
struct bitmap_super_s * bm = (struct bitmap_super_s*)(super+1);
if (__le32_to_cpu(bm->magic) == BITMAP_MAGIC)
if (super->state & (1<<MD_SB_BITMAP_PRESENT)) {
struct bitmap_super_s * bm = (struct bitmap_super_s*)(super+1);
if (__le32_to_cpu(bm->magic) == BITMAP_MAGIC)
- if (write(fd, bm, ROUND_UP(sizeof(*bm),4096)) !=
+ if (write(fd, bm, ROUND_UP(sizeof(*bm),4096)) !=
ROUND_UP(sizeof(struct bitmap_super_s), 4096)) != 0) {
pr_err("%s could not allocate superblock\n", __func__);
return 1;
ROUND_UP(sizeof(struct bitmap_super_s), 4096)) != 0) {
pr_err("%s could not allocate superblock\n", __func__);
return 1;
static void free_super0(struct supertype *st);
static int load_super0(struct supertype *st, int fd, char *devname)
static void free_super0(struct supertype *st);
static int load_super0(struct supertype *st, int fd, char *devname)
min_chunk = 4096; /* sub-page chunks don't work yet.. */
bits = (size * 512) / min_chunk + 1;
while (bits > max_bits) {
min_chunk = 4096; /* sub-page chunks don't work yet.. */
bits = (size * 512) / min_chunk + 1;
while (bits > max_bits) {
static void locate_bitmap0(struct supertype *st, int fd)
{
unsigned long long dsize;
static void locate_bitmap0(struct supertype *st, int fd)
{
unsigned long long dsize;