{
return &mpb->sig[MPB_SIG_LEN];
}
-#endif
+#endif
/* retrieve a disk directly from the anchor when the anchor is known to be
* up-to-date, currently only at load time
break;
}
}
-
+#endif /* MDASSEMBLE */
/*******************************************************************************
* function: imsm_check_attributes
* Description: Function checks if features represented by attributes flags
return ret_val;
}
+#ifndef MDASSEMBLE
static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *map);
static void examine_super_imsm(struct supertype *st, char *homehost)
return err;
}
-
-
static void print_found_intel_controllers(struct sys_dev *elem)
{
for (; elem; elem = elem->next) {
return retval;
}
+#ifndef MDASSEMBLE
/*******************************************************************************
* function: imsm_create_metadata_checkpoint_update
* Description: It creates update for checkpoint change.
close(fd);
return retval;
}
+#endif /* MDASSEMBLE */
static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info, char *dmap)
{
return 0;
}
-static int is_gen_migration(struct imsm_dev *dev);
-
static int write_super_imsm(struct supertype *st, int doclose)
{
struct intel_super *super = st->sb;
get_dev_size(d->fd, NULL, &dsize);
if (lseek64(d->fd, dsize - 512, SEEK_SET) >= 0) {
- write(d->fd, super->migr_rec_buf, 512);
+ if (write(d->fd, super->migr_rec_buf, 512) != 512)
+ perror("Write migr_rec failed");
}
}
if (doclose) {
rebuild->recovery_start = units * blocks_per_migr_unit(super, dev);
}
+#ifndef MDASSEMBLE
static int recover_backup_imsm(struct supertype *st, struct mdinfo *info);
+#endif
static struct mdinfo *container_content_imsm(struct supertype *st, char *subarray)
{
update_recovery_start(super, dev, this);
this->array.spare_disks += spare_disks;
+#ifndef MDASSEMBLE
/* check for reshape */
if (this->reshape_active == 1)
recover_backup_imsm(st, this);
-
+#endif
rest = this;
}
__free_imsm_disk(dl);
}
}
-
+#endif /* MDASSEMBLE */
/*******************************************************************************
* Function: open_backup_targets
* Description: Function opens file descriptors for all devices given in
return 0;
}
+#ifndef MDASSEMBLE
/*******************************************************************************
* Function: init_migr_record_imsm
* Description: Function inits imsm migration record
return 0;
}
-static __u64 blocks_per_migr_unit(struct intel_super *super,
- struct imsm_dev *dev);
-
/*******************************************************************************
* Function: recover_backup_imsm
* Description: Function recovers critical data from the Migration Copy Area
.get_disk_controller_domain = imsm_get_disk_controller_domain,
.reshape_super = imsm_reshape_super,
.manage_reshape = imsm_manage_reshape,
+ .recover_backup = recover_backup_imsm,
#endif
.match_home = match_home_imsm,
.uuid_from_super= uuid_from_super_imsm,
.match_metadata_desc = match_metadata_desc_imsm,
.container_content = container_content_imsm,
- .recover_backup = recover_backup_imsm,
.external = 1,
.name = "imsm",