linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ric Wheeler <rwheeler@redhat.com>
To: Konrad Rzeszutek <konrad@virtualiron.com>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	snitzer@redhat.com, jeff@garzik.org, neilb@suse.de,
	James.Bottomley@hansenpartnership.com, dgilbert@interlog.com,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2 of 8] block: Export I/O topology for block devices	and partitions
Date: Thu, 23 Apr 2009 14:26:21 -0400	[thread overview]
Message-ID: <49F0B2CD.2020706@redhat.com> (raw)
In-Reply-To: <20090423181312.GA8768@mars.virtualiron.com>

Konrad Rzeszutek 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?
> 
> Should there be a comment/Documentation blurb on how to remediate a
> misaligment? Such as how to modify the partition tables and what to look
> for in the BIOS (if anything) to take advantage of 4K sectors?
> 
> Is there a corresponding patch for fdisk that understands 4K sectors? Or
> is that already covered by it doing ioctl calls on the block device?

We need to update the various tools to deal with this data and prevent 
misalignment, some of which is going on already.

I am afraid that if you are misaligned, the only remedy would be to tar up your 
data, recreate an aligned device and then restore :-)

ric


  reply	other threads:[~2009-04-23 18:26 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-23  5:29 [PATCH 0 of 8] I/O topology patch kit Martin K. Petersen
2009-04-23  5:29 ` [PATCH 1 of 8] block: Expose stacked device queues in sysfs Martin K. Petersen
2009-04-23  5:29 ` [PATCH 2 of 8] block: Export I/O topology for block devices and partitions Martin K. Petersen
2009-04-23 10:51   ` Jens Axboe
2009-04-23 11:49     ` Matthew Wilcox
2009-04-23 11:55       ` Jens Axboe
2009-04-23 13:22         ` Matthew Wilcox
2009-04-23 13:30           ` Matthew Wilcox
2009-04-23 13:17     ` Martin K. Petersen
2009-04-23 18:13     ` Konrad Rzeszutek
2009-04-23 18:26       ` Ric Wheeler [this message]
2009-04-23 18:44         ` Matthew Wilcox
2009-04-23 18:34       ` Martin K. Petersen
2009-04-23  5:29 ` [PATCH 3 of 8] MD: Use new topology calls to indicate alignment and I/O sizes Martin K. Petersen
2009-04-23  5:29 ` [PATCH 4 of 8] sd: Physical block size and alignment support Martin K. Petersen
2009-04-23 16:37   ` Konrad Rzeszutek
2009-04-23 18:25     ` Martin K. Petersen
2009-04-23 18:44       ` Konrad Rzeszutek
2009-04-23 19:02         ` Martin K. Petersen
2009-04-23  5:29 ` [PATCH 5 of 8] sd: Detect non-rotational devices Martin K. Petersen
2009-04-23 10:52   ` Jens Axboe
2009-04-23 11:09     ` Jeff Garzik
2009-04-23 11:13       ` Jens Axboe
2009-04-23 11:22         ` Jeff Garzik
2009-04-23 11:38       ` Matthew Wilcox
2009-04-23 11:58         ` Jeff Garzik
2009-04-23 12:03           ` Jens Axboe
2009-04-23 13:16         ` Martin K. Petersen
2009-04-23 13:33           ` Jeff Garzik
2009-04-23 14:10             ` James Bottomley
2009-04-23 14:16               ` Matthew Wilcox
2009-04-23 14:39                 ` Jeff Garzik
2009-04-23 17:25                   ` Matthew Wilcox
2009-04-23 17:37                     ` James Bottomley
2009-04-23  5:29 ` [PATCH 6 of 8] sd: Block limits VPD support Martin K. Petersen
2009-04-23  5:29 ` [PATCH 7 of 8] scsi_debug: Add support for physical block exponent and alignment Martin K. Petersen
2009-04-23  5:29 ` [PATCH 8 of 8] libata: Report disk alignment and physical block size Martin K. Petersen
2009-04-23 13:46   ` Matthew Wilcox
2009-04-23 14:05     ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F0B2CD.2020706@redhat.com \
    --to=rwheeler@redhat.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=dgilbert@interlog.com \
    --cc=jeff@garzik.org \
    --cc=jens.axboe@oracle.com \
    --cc=konrad@virtualiron.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neilb@suse.de \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).