diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:42 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-09-16 05:58:42 +0200 |
commit | 8ed3e5e1bf5b08884b68c3ef5c3e393adaa3c9ba (patch) | |
tree | 8ec55bc8276d23d412b4f7ff4925f55f2d9ddda2 /Create.c | |
parent | imsm: use ->getinfo_super() in ->container_content() (diff) | |
download | mdadm-8ed3e5e1bf5b08884b68c3ef5c3e393adaa3c9ba.tar.xz mdadm-8ed3e5e1bf5b08884b68c3ef5c3e393adaa3c9ba.zip |
Honor safemode_delay at Create() and Incremental() time
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Create.c')
-rw-r--r-- | Create.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -78,6 +78,7 @@ int Create(struct supertype *st, char *mddev, int mdfd, struct mdinfo *sra; struct mdinfo info, *infos; int did_default = 0; + unsigned long safe_mode_delay = 0; int major_num = BITMAP_MAJOR_HI; @@ -703,6 +704,7 @@ int Create(struct supertype *st, char *mddev, int mdfd, st->ss->add_to_super(st, &inf->disk, fd, dv->devname); st->ss->getinfo_super(st, inf); + safe_mode_delay = inf->safe_mode_delay; /* getinfo_super might have lost these ... */ inf->disk.major = major(stb.st_rdev); @@ -757,6 +759,7 @@ int Create(struct supertype *st, char *mddev, int mdfd, "readonly"); break; } + sysfs_set_safemode(sra, safe_mode_delay); } else { mdu_param_t param; if (ioctl(mdfd, RUN_ARRAY, ¶m)) { |