From: Jiri Denemark Date: Mon, 22 Feb 2010 11:24:02 +0000 (+0100) Subject: Create raw storage files with O_DSYNC (again) X-Git-Tag: v0.7.7~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9568c1d985baab59d54f7cd155300f1f9bdbf3c0;p=thirdparty%2Flibvirt.git Create raw storage files with O_DSYNC (again) Recently we introduced O_DSYNC flag when creating raw storage files to avoid filling all disk cache with dirty pages. However, the patch got lost when virStorageBackendCreateRaw was reworked using virFileOperation. Let's use O_DSYNC again. --- diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c index 8b9ed5d393..374249334e 100644 --- a/src/storage/storage_backend.c +++ b/src/storage/storage_backend.c @@ -356,7 +356,8 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED, goto cleanup; } - if ((createstat = virFileOperation(vol->target.path, O_RDWR | O_CREAT | O_EXCL, + if ((createstat = virFileOperation(vol->target.path, + O_RDWR | O_CREAT | O_EXCL | O_DSYNC, vol->target.perms.mode, vol->target.perms.uid, vol->target.perms.gid, createRawFileOpHook, &hdata,