From: Ross S. W. W. <RW...@me...> - 2010-02-27 00:55:59
|
On Feb 26, 2010, at 6:18 PM, "Lars Ellenberg" <la...@li...> wrote: > On Fri, Feb 26, 2010 at 05:01:46PM -0500, Ross S. W. Walker wrote: > > > but, afaik, > > > if you have a queue->limit.logical_block_size = 4096, > > > it is illegal to submit a bio less than that, or unaligned. > > > It just won't work. > > > > The current Linux block layer only accepts sector sizes of > > 512 bytes. > > > > > Or I really need some sleep :) > > I seriously do _now_, but anyways... > > > Ok doing a simple grep for blk_shift: > > > > [root@storage2 kernel]# grep -n blk_shift * > > iscsi.c:755: *off <<= lu->blk_shift; > > iscsi.c:756: *len <<= lu->blk_shift; > > Yeah. But that is absolutely not what I meant. > > Ok, to make myself clear, attached is a very simple kernel module > and Makefile. > compile: make -C /usr/src/linux-headers-2.6.31-19-generic/ M=$PWD > modules > > It intentionally fails to load, > but in the module init prepares one bio depending on module parameers, > and does a submit_bio, and printk's some messages. > > To actually get the results needed to understand my point, > you need a device with logical_block_size != 512. > > Even though these are shipping today > already, they are still sufficiently rare that I did not see one > in real life yet. > > But now we patched iet to provide that, > that should be easy enough. > At least that is my testing target now: > > blockdev --getss /dev/sdb > 2048 > > Test run on > Linux soda 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC > 2010 i686 GNU/Linux > > > results in dmesg is interleaved, > as I said, "Invalid parameters" is intentional. > Have a look at when the "error: -5" occur. > > Hope you understand me this time, > or point me were I'm still not getting it. > Can you post the code for the test module? What you are basically saying is that the Linux block layer doesn't support devices whose sector size != 512. I think we might need an outside opinion on this. Maybe Jens would reply to a query on this? If that is the case then maybe blockio can't use a definable sector size? -Ross ______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof. |