From: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] restore rw support for vvfat
Date: Tue, 11 Mar 2008 03:12:52 -0500 [thread overview]
Message-ID: <20080311081252.GA25527@tapir> (raw)
[-- 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 */
next reply other threads:[~2008-03-11 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 8:12 Carlo Marcelo Arenas Belon [this message]
2008-03-11 10:11 ` [Qemu-devel] [PATCH] restore rw support for vvfat Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080311081252.GA25527@tapir \
--to=carenas@sajinet.com.pe \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.