From: Ross S. W. W. <RW...@me...> - 2010-02-27 01:09:03
|
Ross S. W. Walker [mailto:RW...@me...] wrote: > Lars Ellenberg [mailto:la...@li...] wrote: > > On Sat, Feb 27, 2010 at 12:18:29AM +0100, Lars Ellenberg wrote: > > > 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. > > > > (we just happen to come accoss some s390 device with such properties > > years ago during DRBD development...) > > > > > [91988.225474] sd 18:0:0:0: [sdb] Bad block number requested > > > > Now that I have the error message to grep for, > > I can even point you at the code: > > drivers/scsi/sd.c, sd_prep_fn(), > > lines 562 ff > > if (sdp->sector_size == 1024) { > > if ((block & 1) || (blk_rq_sectors(rq) & 1)) { > > ... > > and similar. > > Maybe we need to make sure the minimum definable sector > size is bdev_physical_block_size(bdev) for block-io? Doh, that's what your patch does! > File-io obviously doesn't need to contend with that as it > handles 4k data chunks anyways. Have you tried doing a block shift of bi_sector equal to the queue_hardsect_size/queue_physical_block_size even though it says it will always be 512 doesn't necessarily make it true. How does other code handle this? -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. |