From 9568c1d985baab59d54f7cd155300f1f9bdbf3c0 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Mon, 22 Feb 2010 12:24:02 +0100 Subject: [PATCH] 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. --- src/storage/storage_backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- GitLab