DDF: fix writing metadata updates.

Recent commit 273989b93a
skipped writing some large blocks of 0xFF, but didn't seek
over the space, so subsequent data was written wrongly.

When we don't write, we need to seek.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2013-08-05 14:21:10 +10:00
parent 57631ca2ff
commit ce45c81986
1 changed files with 2 additions and 1 deletions

View File

@ -2907,7 +2907,8 @@ static int __write_ddf_structure(struct dl *d, struct ddf_super *ddf, __u8 type,
}
if (write(fd, null_aligned, togo) < 0)
break;
}
} else
lseek(fd, conf_size, SEEK_CUR);
}
if (i <= n_config)
goto out;