public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: Carlos O'Donell <carlos@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>, libc-ports@sourceware.org
Subject: Re: [RFC] Copy as much as you can during a 32-bit stat before returning EOVERFLOW?
Date: Tue, 26 Feb 2013 23:49:00 -0000	[thread overview]
Message-ID: <20130226234849.GH20323@brightrain.aerifal.cx> (raw)
In-Reply-To: <512D1335.1020704@redhat.com>

On Tue, Feb 26, 2013 at 02:55:33PM -0500, Carlos O'Donell wrote:
> Community,
> 
> There are several filesystems which are going to be switching over
> or already have switched over to unconditional 64-bit inodes and 
> file sizes. This means that the current crop of 32-bit applications
> may not be able to run reliably on these filesystems since stat 
> may return EOVERFLOW for large values.

Can we PLEASE reconsider the decision to keep supporting 32-bit off_t?
If we're to the point where stat() *randomly* (from the application's
and user's perspective) fails when compiled with 32-bit off_t, then I
think such programs are just fundamentally broken now, and need to be
deprecated. Despite the move to compile everythin with
-D_FILE_OFFSET_BITS=64, last time I checked, Debian still has a number
of packages which are compiled without it, and thus which might
experience random breakage on newer filesystems.

In my opinion, the migration path should be something like this:

Stage 1: Change the default for _FILE_OFFSET_BITS to 64 on all
targets, and make 32-bit off_t accessible only by explicitly
requesting -D_FILE_OFFSET_BITS=32. This should help transition all the
stragglers who are just straggling because they don't know better; the
few who have fundamentally buggy code that's incompatible with 64-bit
off_t can use the workaround (-D_FILE_OFFSET_BITS=32) until they get
their acts together.

Stage 2: Remove all 32-bit off_t infrastructure from the headers and
leave the legacy 32-bit off_t symbols around only for use by
already-linked applications. At this point, New symbol versions can be
introduced for all of the functions (open, etc.) so that hacks
remapping them to the nonconforming namespace names (open->open64,
etc.) can be removed; legacy applications can get the legacy behavior
based on the symbol version rather than the symbol name. This will
also resolve the issue that glibc does not allow you to declare some
of these functions yourself without including the associated header.

I would be perfectly happy with stage 1 being made in the next release
cycle and stafe 2 in the following release cycle, but if it would be
more agreeable to wait 2 or more release cycles before stage 2, that's
still much better than living with the current breakage indefinitely.

Opinions?

Rich

  parent reply	other threads:[~2013-02-26 23:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 19:55 Carlos O'Donell
2013-02-26 20:37 ` Paul Eggert
2013-02-26 22:59   ` Joseph S. Myers
2013-02-26 21:00 ` Roland McGrath
2013-02-26 23:05   ` Joseph S. Myers
2013-02-27 19:26   ` Carlos O'Donell
2013-02-26 23:49 ` Rich Felker [this message]
2013-02-26 23:58   ` Roland McGrath

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=20130226234849.GH20323@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).