From: "Spensky, Chad - 0559 - MITLL" <chad.spensky@ll.mit.edu>
To: Wolfgang Richter <wolf@cs.cmu.edu>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, Fam Zheng <famz@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: KVM Block Device Driver
Date: Wed, 14 Aug 2013 14:44:25 -0400 [thread overview]
Message-ID: <CE31474C.E079%chad.spensky@ll.mit.edu> (raw)
In-Reply-To: <CACO=3k5sQkjCp+gMzq0bg0vu_MP7R29--MNVgbk9Z9KaVu+BKA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2811 bytes --]
Wolfgang,
Thanks so much for the response. It turns out that wasn't handling the
QEMUIOVector properly. When I first implemented it, I saw that the iovec
was a pointer and assumed that there would only ever be one. Given the
lack of documentation and my lack of understanding this went undetected
for a while. everything now seems to work just fine. :-) See below for
the portion of code that threw me off. Thanks again!
- Chad
Proposed change to qemu-common.h (:
typedef struct QEMUIOVector {
struct iovec *iov;
int niov;
int nalloc;
size_t size;
} QEMUIOVector;
changed to:
// Array of I/O vectors
typedef struct QEMUIOVector {
struct iovec iov[];
int niov;
int nalloc;
size_t size;
} QEMUIOVector;
--
Chad S. Spensky
MIT Lincoln Laboratory
Group 59 (Cyber Systems Assessment)
Ph: (781) 981-4173
On 8/14/13 11:49 AM, "Wolfgang Richter" <wolf@cs.cmu.edu> wrote:
>Read through the kvm thread (I'm not on that mailing just just for
>reference; thanks for the CC).
>
>I saw you're hooking a different function than me (not sure it
>matters). I hook bdrv_co_writev and I operate on the passed in
>iovector datastructure there writing out its contents and a short
>header to stderr where my introspection tools interpret it. I don't
>maintain a full shadow copy of the disk, but it conceptually shouldn't
>matter.
>
>Are you working on the iovec data structure as well? Also, is your
>disk format raw? I don't think it should matter, but I was just
>wondering.
>
>--
>Wolf
>
>On Wed, Aug 14, 2013 at 11:02 AM, Wolfgang Richter <wolf@cs.cmu.edu>
>wrote:
>> On Wed, Aug 14, 2013 at 10:43 AM, Spensky, Chad - 0559 - MITLL
>> <chad.spensky@ll.mit.edu> wrote:
>>> Wolf,
>>>
>>> We're able to get all of the meta data just fine.
>>
>> I assume by meta-data you mean (essentially) "function" call
>> parameters within QEMU as to the (1) location of the write on disk,
>> and (2) the amount of data being written out (in bytes).
>>
>>> However it seems that
>>> the actual content of the read/write seems to be wrong some of the
>>>time.
>>
>> That's very odd, I'm pretty sure I never had that bug (although I
>> might silently have it!).
>>
>> I did occasionally observe a kernel accidentally writing out kernel
>> buffers that hadn't been cleared to disk (guest kernel) :-)
>>
>>> The first 2 sectors seem to always be correct, however on some writes,
>>>the
>>> data that we traced does not match up with the data we are actually
>>>seeing
>>> in the .img file for the guest on disk.
>>
>> Are you certain you're getting every write? Sometimes things might be
>> written to rapidly in succession?
>>
>> How are you obtaining the shadow copy of the write stream (maybe there
>> was earlier stuff in this thread I should read up on)?
>>
>> --
>> Wolf
>
>
>
>--
>Wolf
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5142 bytes --]
next prev parent reply other threads:[~2013-08-14 18:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 20:13 KVM Block Device Driver Spensky, Chad - 0559 - MITLL
2013-08-14 2:40 ` Fam Zheng
2013-08-14 10:05 ` Stefan Hajnoczi
2013-08-14 11:29 ` Spensky, Chad - 0559 - MITLL
2013-08-14 12:16 ` Fam Zheng
2013-08-14 12:19 ` Spensky, Chad - 0559 - MITLL
2013-08-14 12:35 ` Fam Zheng
2013-08-14 14:07 ` Stefan Hajnoczi
2013-08-14 14:40 ` Wolfgang Richter
2013-08-14 14:43 ` Spensky, Chad - 0559 - MITLL
2013-08-14 15:02 ` Wolfgang Richter
2013-08-14 15:49 ` Wolfgang Richter
2013-08-14 18:44 ` Spensky, Chad - 0559 - MITLL [this message]
2013-08-14 19:42 ` Wolfgang Richter
2013-08-18 14:04 ` Paolo Bonzini
2013-08-18 14:48 ` Wolfgang Richter
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=CE31474C.E079%chad.spensky@ll.mit.edu \
--to=chad.spensky@ll.mit.edu \
--cc=famz@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=stefanha@gmail.com \
--cc=wolf@cs.cmu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox