NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/44504: kernel panics when dding some block sizes to USB flash drives at sd0
The following reply was made to PR kern/44504; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/44504: kernel panics when dding some block sizes to USB
flash drives at sd0
Date: Mon, 7 Feb 2011 08:02:23 +0000
On Wed, Feb 02, 2011 at 10:00:01PM +0000, Taylor R Campbell wrote:
> If F is a file whose size is not an even multiple of 4k, then
>
> # dd if=F of=/dev/sd0d
>
> also triggers the panic.
>
> A block size of 4k does not seem to trigger it; nor does using
> rsd0d. Specifying a block size that is not a multiple of 512
> with rsd0d fails with EINVAL, but a block size of 512 works,
> even though 512 on sd0d triggers the panic.
At least part of the answer with sd0d (rather than rsd0d) is "don't do
that". Sending data through the metadata cache is not recommended.
That said, it shouldn't panic. I'm surprised it allows unaligned
writes at all; I'm guessing that attempting them is generating
odd-sized buffers that aren't getting written out properly. Or
something like that.
Arguably this pathway into the metadata cache shouldn't exist; it's an
artifact of the way the unified buffer cache was integrated.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index