All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ioemu : add flush in ide_unplug_harddisks()
@ 2009-02-20  3:29 Tomonari Horikoshi
  2009-02-20 11:40 ` Stefano Stabellini
  0 siblings, 1 reply; 4+ messages in thread
From: Tomonari Horikoshi @ 2009-02-20  3:29 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 234 bytes --]


Hi

I think the "flush" is necessary. 
When "ioemu ide device" changes into "vbd" by "ide_unplug_harddisks()". 

What do you think?


Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>

Best regards,
 Tomonari Horikoshi


[-- Attachment #2: ioemu_add_ideflush_in_unplug.patch --]
[-- Type: application/octet-stream, Size: 451 bytes --]

diff --git a/hw/ide.c b/hw/ide.c
index da7057c..d3e35b0 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -2928,6 +2928,10 @@ static void _ide_unplug_harddisks(int start)
         for (j = 0; j < nb_drives; j++)
             if (drives_table[j].bdrv == s->bs)
                 drives_table[j].bdrv = NULL;
+
+        bdrv_flush(s->bs);
+        bdrv_aio_flush(s->bs, ide_flush_cb, s);
+
         bdrv_close(s->bs);
         s->bs = NULL;
         ide_reset(s);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-23 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  3:29 [PATCH] ioemu : add flush in ide_unplug_harddisks() Tomonari Horikoshi
2009-02-20 11:40 ` Stefano Stabellini
2009-02-23 16:41   ` Ian Jackson
2009-02-23 23:46     ` Tomonari Horikoshi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.