From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: 2 TB wraparound on 32 bit host
Date: Sat, 12 Jun 2010 11:09:09 -0500 [thread overview]
Message-ID: <1276358949.4399.8.camel@mulgrave.site> (raw)
In-Reply-To: <1276358598.4399.3.camel@mulgrave.site>
On Sat, 2010-06-12 at 11:03 -0500, James Bottomley wrote:
> On Sat, 2010-06-12 at 11:45 -0400, Phillip Susi wrote:
> > On 06/11/2010 05:16 PM, James Bottomley wrote:
> > > So best guess is that CONFIG_LBDAF isn't set. This would make all
> > > sector_t counts wrap at 2TB (32 bits worth of 512 bytes). It would be
> > > rather a daft thing for a distribution not to have set, though ...
> >
> > Bingo, thanks. It doesn't seem to be set on this machine running the
> > amd64 2.6.32 lucid build which also appears to suffer the same problem.
>
> So is this a default kernel or did you build your own ... because if
> it's a vanilla ubuntu kernel, not setting this config option would be
> pretty embarrassing (not to mention annoy a lot of users)?
>
> > If this config option isn't set though, shouldn't the kernel fail
> > calls like llseek() that try to exceed the limit, rather than silently
> > wrap around to the wrong address?
>
> Not really ... it's defaulted to y; only people who know what they're
> doing should set it to N. These people are mostly embedded and will
> never connect > 2TB devices to their system, so checking is a waste of
> time and space for them. Plus making the checks exhaustive and
> foolproof is just about impossible given that we alter the underlying
> size of sector_t and wrap around without warning is the C default.
Actually, looking at the above, this is conflicting information. On 64
bit systems (like amd64) there's no need to set CONFIG_LBDAF because
sector_t is an unsigned long, which is 64 bits. It's only on 32 bit
configurations it gets set. Initially you said you were using a PAE
i686 configuration, which would need this setting. An amd64 one
wouldn't.
Which kernel are you actually seeing the problem on, and what is
CONFIG_LBDAF set to on that kernel?
James
next prev parent reply other threads:[~2010-06-12 16:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 20:57 2 TB wraparound on 32 bit host Phillip Susi
2010-06-11 21:16 ` James Bottomley
2010-06-12 15:45 ` Phillip Susi
2010-06-12 16:03 ` James Bottomley
2010-06-12 16:09 ` James Bottomley [this message]
2010-06-12 17:58 ` Phillip Susi
2010-06-12 18:47 ` 2 TB wraparound on snapshots Phillip Susi
2010-06-12 20:03 ` James Bottomley
2010-06-12 22:03 ` Phillip Susi
2010-06-15 14:57 ` 2 TB wraparound on snapshots on kernels < 2.6.33 Phillip Susi
2010-06-16 13:13 ` Mikulas Patocka
2010-06-16 13:45 ` Mikulas Patocka
2010-06-16 13:52 ` Phillip Susi
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=1276358949.4399.8.camel@mulgrave.site \
--to=james.bottomley@hansenpartnership.com \
--cc=dm-devel@redhat.com \
--cc=psusi@cfl.rr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.