mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: fix blk_queue_alignment_offset
Date: Sun, 19 Jul 2009 22:19:55 -0400	[thread overview]
Message-ID: <yq1ab30jdtg.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20090719223649.GA32719@lst.de> (Christoph Hellwig's message of "Mon, 20 Jul 2009 00:36:49 +0200")

>>>>> "hch" == Christoph Hellwig <hch@lst.de> writes:

hch> We need to mask out bits inside the logical block, not outside of
hch> it, otherwise we'll always get a 0 alignment_offset.

The alignment_offset only makes sense if physical_block_size >
logical_block_size.  For instance (63 * 512) & (4096 - 1) = 3584.

Your patch would yield 28672 = 4096 * 7 and that's incorrect; LBA 63 is
not aligned on a 4KB boundary...

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2009-07-20  2:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-19 22:36 Christoph Hellwig
2009-07-20  2:19 ` Martin K. Petersen [this message]

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=yq1ab30jdtg.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome