Commit cbf46290 authored by Chris Lalancette's avatar Chris Lalancette Committed by Konrad Rzeszutek Wilk

xen/blkback: Flush blkback data when connecting.

First cut at flushing blkback data when first connecting
blkback.  This should avoid the pygrub issues we are experiencing
in (RedHat bugzilla) 466681.

[ 2.6.18-xen.hg commit 63b4d7f56688 ]
Signed-off-by: default avatarChris Lalancette <clalance@redhat.com>
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 98e036a3
...@@ -91,6 +91,13 @@ static void update_blkif_status(blkif_t *blkif) ...@@ -91,6 +91,13 @@ static void update_blkif_status(blkif_t *blkif)
return; return;
} }
err = filemap_write_and_wait(blkif->vbd.bdev->bd_inode->i_mapping);
if (err) {
xenbus_dev_error(blkif->be->dev, err, "block flush");
return;
}
invalidate_inode_pages2(blkif->vbd.bdev->bd_inode->i_mapping);
blkif->xenblkd = kthread_run(blkif_schedule, blkif, name); blkif->xenblkd = kthread_run(blkif_schedule, blkif, name);
if (IS_ERR(blkif->xenblkd)) { if (IS_ERR(blkif->xenblkd)) {
err = PTR_ERR(blkif->xenblkd); err = PTR_ERR(blkif->xenblkd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment