When deleting key, flush write cache after each overwrite, so we don't

overwrite data N times in cache and only once on disk.
This commit is contained in:
Pawel Jakub Dawidek 2007-05-06 14:56:03 +00:00
parent 18eb427c60
commit f0256e71f1

View File

@ -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));