Subject: Re: Corrupt data when reading filesystems under Linux guest
To: None <port-xen@NetBSD.org>
From: Jed Davis <jdev@panix.com>
List: port-xen
Date: 06/09/2005 07:21:18
In article <1118281429.532953.2723.nullmailer@yamt.dyndns.org>,
YAMAMOTO Takashi  <yamt@mwd.biglobe.ne.jp> wrote:
> > So: am I completely wrong in my reading of the relevant source, or is
> > NetBSD's xbd backend broken?
> 
> you're right.  our (netbsd's) backends are broken.
> 
> > And no, I don't see the point in scatter/gathering a single page of I/O
> > into individual segments for each constituent sector, which is what it
> > looks like the problematic guest is doing, but that doesn't change that
> > the backend should answer it correctly.
> 
> besides that, xen_shm assumes an arbitrary request can be mapped into
> a single contiguous virtual address range.  it's wrong.

It looks like it might be possible to fix that by changing xbdback_io
to send off multiple xbdback_requests.  And with that done right, it
shouldn't be too hard to glue together request segments that can be
mapped into contiguous VM.

So I might even be able to fix this myself, if no-one more knowledgeable
is working on it.

-- 
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l))))))  (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k)))))))    '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))