diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-06 14:56:03 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-06 14:56:03 +0000 |
commit | 52b222af918c720fc9611dc4a1e088859feaac05 (patch) | |
tree | 8868cfbcf842fc558d9284ebf05d12914026f210 /sys/geom/eli/g_eli_ctl.c | |
parent | 241a16483d1b52abb0e2fd967bd0fd9acc46f4ea (diff) | |
download | FreeBSD-src-52b222af918c720fc9611dc4a1e088859feaac05.zip FreeBSD-src-52b222af918c720fc9611dc4a1e088859feaac05.tar.gz |
When deleting key, flush write cache after each overwrite, so we don't
overwrite data N times in cache and only once on disk.
Diffstat (limited to 'sys/geom/eli/g_eli_ctl.c')
-rw-r--r-- | sys/geom/eli/g_eli_ctl.c | 5 |
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 7ae56b9..558a4f2 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)); |