Re: [PATCH 2 of 8] block: Export I/O topology for block devices and partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23 2009, Matthew Wilcox wrote:
> On Thu, Apr 23, 2009 at 12:51:45PM +0200, Jens Axboe wrote:
> > > +/**
> > > + * blk_queue_alignment - set alignment for the queue
> > > + * @q:  the request queue for the device
> > > + * @alignment:  alignment offset in bytes
> > > + *
> > > + * Description:
> > > + *   Some devices are naturally misaligned to compensate for things like
> > > + *   the legacy DOS partition table 63-sector offset.  Low-level drivers
> > > + *   should call this function for devices whose first sector is not
> > > + *   naturally aligned.
> > > + */
> > > +void blk_queue_alignment(struct request_queue *q, unsigned int alignment)
> > > +{
> > > +	q->alignment = alignment & (q->granularity - 1);
> > > +	clear_bit(QUEUE_FLAG_MISALIGNED, &q->queue_flags);
> > > +}
> > > +EXPORT_SYMBOL(blk_queue_alignment);
> > 
> > How would low-level drivers know?
> 
> ATA reports this in the INQUIRY data.  SCSI reports it in READ CAPACITY 16.

OK, I wasn't aware of that. That's a relief!

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux