shutdown: also fsync() MD devices when going down
Let's make this explicit, just in case this suffers by the same issues as the loopback devices, and drops in-flight IO when we disassemble it.
This commit is contained in:
parent
1a269c4ee3
commit
32c4626c4c
|
@ -484,6 +484,9 @@ static int delete_md(MountPoint *m) {
|
|||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
if (fsync(fd) < 0)
|
||||
log_debug_errno(errno, "Failed to sync MD block device %s, ignoring: %m", m->path);
|
||||
|
||||
if (ioctl(fd, STOP_ARRAY, NULL) < 0)
|
||||
return -errno;
|
||||
|
||||
|
|
Loading…
Reference in a new issue