1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169313

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