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:
parent
18eb427c60
commit
f0256e71f1
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user