Date: Mon, 20 Aug 2007 02:25:02 -0400 From: Howard Goldstein <hg@queue.to> To: arne_woerner@yahoo.com Cc: freebsd-geom@freebsd.org Subject: Re: graid5, 3 consumers, unaligned access Message-ID: <46C933BE.9090904@queue.to> In-Reply-To: <829676.49356.qm@web30306.mail.mud.yahoo.com> References: <829676.49356.qm@web30306.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Arne Wörner wrote: > --- Howard Goldstein <hg@queue.to> wrote: >> Due to a bug in the twe driver I've noticed quite a few accesses to the >> graid5 consumer that aren't on 512 byte boundaries. These are all 3 >> > How can you tell, that the offsets/lengths are not integer multiples of the > sector size (512 here most likely)? The twe driver has a design flaw that depends on malloc()ing bounce buffers when it's handed data not aligned on 512 byte boundaries. When malloc fails, the driver syslogs a unique error that only can come from the part where it's acting on unaligned data. The question is why data are being sent to this driver unaligned. dd'ing to offset 0 at the beginning of three unpartitioned data disks for 3000x1MB doesn't present any opportunities I can think of for things to go out of alignment multiple times while writing the 3GB. It also happens during ordinary desktop operations (nothing extraordinary), and when restore xf -'ng a filesystem onto the raid array from a backup drive. > > Maybe you mix it up with some block number (which is not necessarily a multiple > of the sector size)? > > Can you give an example for such strange accesses? It was in the message you replied to, the dd invocation, that's the easiest to induce. I can make it happen at will. The indication is Aug 19 03:05:59 cally kernel: twe0: twe_map_request: malloc failed Aug 19 03:06:48 cally kernel: twe0: twe_map_request: malloc failed Aug 19 03:20:12 cally kernel: twe0: twe_map_request: malloc failed Inspection of the twe driver (twe_freebsd.c) will show that mesage only occurs when mallocing for the bounce buffer fails.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46C933BE.9090904>