summaryrefslogtreecommitdiff
path: root/sys/geom/eli/g_eli_ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/eli/g_eli_ctl.c')
-rw-r--r--sys/geom/eli/g_eli_ctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c
index 7ae56b971c92..558a4f278f16 100644
--- a/sys/geom/eli/g_eli_ctl.c
+++ b/sys/geom/eli/g_eli_ctl.c
@@ -684,6 +684,11 @@ g_eli_ctl_delkey(struct gctl_req *req, struct g_class *mp)
G_ELI_DEBUG(0, "Cannot store metadata on %s "
"(error=%d).", pp->name, error);
}
+ /*
+ * Flush write cache so we don't overwrite data N times in cache
+ * and only once on disk.
+ */
+ g_io_flush(cp);
}
bzero(&md, sizeof(md));
bzero(sector, sizeof(sector));