From 2ac59f5eebe806185a999964a218f76a9f2c025c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 30 Mar 2009 21:55:25 -0600 Subject: [PATCH] --- yaml --- r: 139077 b: refs/heads/master c: d1881d3192a3d3e8dc4f255b03187f4c36cb0617 h: refs/heads/master i: 139075: a067efba546f4c729716c5680dde33cee3a22fa4 v: v3 --- [refs] | 2 +- trunk/Documentation/lguest/lguest.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index eef53df8fa73..f687b1bd3f48 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: df1693abc42e34bbc4351e179dbe66c28a94efb8 +refs/heads/master: d1881d3192a3d3e8dc4f255b03187f4c36cb0617 diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index f2dbbf3bdeab..d36fcc0f2715 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -1630,6 +1630,13 @@ static bool service_io(struct device *dev) } } + /* OK, so we noted that it was pretty poor to use an fdatasync as a + * barrier. But Christoph Hellwig points out that we need a sync + * *afterwards* as well: "Barriers specify no reordering to the front + * or the back." And Jens Axboe confirmed it, so here we are: */ + if (out->type & VIRTIO_BLK_T_BARRIER) + fdatasync(vblk->fd); + /* We can't trigger an IRQ, because we're not the Launcher. It does * that when we tell it we're done. */ add_used(dev->vq, head, wlen);