[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] blkback: Flush blkback data when connecting.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1264084745 0
# Node ID 63b4d7f56688f38fd42ede433fd0f7220e545cda
# Parent  f47c07325a56463fa052b4500b4a3c0056939d15
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.

Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
---
 drivers/xen/blkback/xenbus.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -r f47c07325a56 -r 63b4d7f56688 drivers/xen/blkback/xenbus.c
--- a/drivers/xen/blkback/xenbus.c      Thu Jan 21 09:08:35 2010 +0000
+++ b/drivers/xen/blkback/xenbus.c      Thu Jan 21 14:39:05 2010 +0000
@@ -87,6 +87,13 @@ static void update_blkif_status(blkif_t 
                xenbus_dev_error(blkif->be->dev, err, "get blkback dev name");
                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)) {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.