Skip to content

Commit

Permalink
xen/blkback: Flush blkback data when connecting.
Browse files Browse the repository at this point in the history
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: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Chris Lalancette authored and Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent 98e036a commit cbf4629
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/xen/blkback/xenbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ static void update_blkif_status(blkif_t *blkif)
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);
if (IS_ERR(blkif->xenblkd)) {
err = PTR_ERR(blkif->xenblkd);
Expand Down

0 comments on commit cbf4629

Please sign in to comment.