]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools, qcow: Don't fdatasync() L2 table writeout
authorPekka Enberg <penberg@kernel.org>
Sat, 9 Jul 2011 07:37:58 +0000 (10:37 +0300)
committerPekka Enberg <penberg@kernel.org>
Sun, 10 Jul 2011 12:23:22 +0000 (15:23 +0300)
There's now now point in making sure new L2 tables actually hit the disk before
we write out data to clusters because they are not visible on-disk until
qcow_disk_flush() is called which flushes the L1 table.

Cc: Asias He <asias.hejun@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Prasad Joshi <prasadjoshi124@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/disk/qcow.c

index 0fef92f5b703f239a635c11c4f6b566435062daf..35408ab05694a100e9f397bcb0249bcbc8e7bff1 100644 (file)
@@ -345,7 +345,7 @@ static u64 qcow_write_l2_table(struct qcow *q, u64 *table)
        clust_sz        = 1 << header->cluster_bits;
        off             = ALIGN(f_sz, clust_sz);
 
-       if (qcow_pwrite_sync(q->fd, table, sz * sizeof(u64), off) < 0)
+       if (pwrite_in_full(q->fd, table, sz * sizeof(u64), off) < 0)
                return 0;
 
        return off;