All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] restore rw support for vvfat
@ 2008-03-11  8:12 Carlo Marcelo Arenas Belon
  2008-03-11 10:11 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Carlo Marcelo Arenas Belon @ 2008-03-11  8:12 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

The attached patch, restores support for writable block devices using
Virtual FAT disk images.

RW support using a generated qcow base image was modified after qemu 0.8.2
was released; while adding AIO support to block-qcow.c in release 1.8; and
resulting in a broken qcow image based in an inexistent "fat:" base
when "fat:rw" was requested.

Carlo

[-- Attachment #2: qemu-vvfat-rw.patch --]
[-- Type: text/plain, Size: 1257 bytes --]

Index: block-qcow.c
===================================================================
RCS file: /sources/qemu/qemu/block-qcow.c,v
retrieving revision 1.15
diff -u -r1.15 block-qcow.c
--- block-qcow.c	11 Nov 2007 02:51:16 -0000	1.15
+++ block-qcow.c	11 Mar 2008 07:29:00 -0000
@@ -752,11 +752,15 @@
     header_size = sizeof(header);
     backing_filename_len = 0;
     if (backing_file) {
-        header.backing_file_offset = cpu_to_be64(header_size);
-        backing_filename_len = strlen(backing_file);
-        header.backing_file_size = cpu_to_be32(backing_filename_len);
-        header_size += backing_filename_len;
-        header.mtime = cpu_to_be32(0);
+        if (strcmp(backing_file, "fat:")) {
+            header.backing_file_offset = cpu_to_be64(header_size);
+            backing_filename_len = strlen(backing_file);
+            header.backing_file_size = cpu_to_be32(backing_filename_len);
+            header_size += backing_filename_len;
+        } else {
+            /* special backing file for vvfat */
+            backing_file = NULL;
+        }
         header.cluster_bits = 9; /* 512 byte cluster to avoid copying
                                     unmodifyed sectors */
         header.l2_bits = 12; /* 32 KB L2 tables */

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

end of thread, other threads:[~2008-03-11 10:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-11  8:12 [Qemu-devel] [PATCH] restore rw support for vvfat Carlo Marcelo Arenas Belon
2008-03-11 10:11 ` Johannes Schindelin

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.