public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Anton Salikhmetov <alexo@tuxera.com>, linux-kernel@vger.kernel.org
Subject: Re: hfsplus mount regression in 2.6.38
Date: Fri, 27 May 2011 08:23:56 -0500	[thread overview]
Message-ID: <20110527132356.GA13908@thinkpad-t410> (raw)
In-Reply-To: <20110527092522.GA11600@infradead.org>

On Fri, May 27, 2011 at 05:25:22AM -0400, Christoph Hellwig wrote:
> On Wed, May 25, 2011 at 09:25:21AM -0500, Seth Forshee wrote:
> > Reverting commits 52399b1 (hfsplus: use raw bio access for the volume
> > headers) and 358f26d5 (hfsplus: use raw bio access for partition tables)
> > fixes the problems. It appears the problems are due to hfsplus
> > submitting 512 byte bios to a block device whose sector size is larger
> > than 512 byts (2 KB in the log above), and the block driver is quite
> > reasonably rejecting any requests without proper sector alignment.
> > 
> > How would you suggest fixing this?  Most file systems are using
> > sb_bread() for this sort of thing, but since the offending patches are
> > intended to stop using buffer_heads I'm assuming that's not an option.
> 
> Basically all hardcoded uses of HFSPLUS_SECTOR_SIZE need to be replaced
> with a use of bdev_logical_block_size, or a per-sb variable derived from
> it, and the addressing needs to be accomodated to fit it.  I'd need to
> look into a bit more detail in what form the sectors we pass into it
> are in - we might have to convert them from 512byte to large units,
> or they might already be in it.  If they happen to be in 512 byte units
> we might have to do read-modify write cycles.

It seems reasonable to use sb->s_blocksize for this, as it shouldn't get
set to anything larger than the logical block size. That's what
sb_bread() uses in fact.

> What large sector size device do you have, a CDROM?

I don't have any large-sector devices personally, these are reports
coming in from users. Many of them are seeing this problem with iPods,
and some have reported it with HDDs. As far as I know none of the
reports have been with a CDROM. Here's a link to the bug.

  http://bugs.launchpad.net/bugs/734883

  reply	other threads:[~2011-05-27 13:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25 14:25 hfsplus mount regression in 2.6.38 Seth Forshee
2011-05-27  9:25 ` Christoph Hellwig
2011-05-27 13:23   ` Seth Forshee [this message]
2011-05-27 18:24     ` Seth Forshee
2011-06-02 21:58       ` Seth Forshee
2011-06-30 11:35         ` Christoph Hellwig
2011-06-30 13:10           ` Seth Forshee
2011-06-30 13:12             ` Christoph Hellwig

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=20110527132356.GA13908@thinkpad-t410 \
    --to=seth.forshee@canonical.com \
    --cc=alexo@tuxera.com \
    --cc=hch@infradead.org \
    --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