public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [PATCH] Fix {,f}pathconf
Date: Fri, 18 Oct 2002 12:04:00 -0000	[thread overview]
Message-ID: <200210181859.g9IIx4500417@magilla.sf.frob.com> (raw)
In-Reply-To: Jakub Jelinek's message of  Friday, 18 October 2002 16:59:50 +0200 <20021018165950.T3451@sunsite.ms.mff.cuni.cz>

> Recent pathconf changes broke alpha build (both linux/pathconf.c and
> alpha/linux/pathconf.c are redefining __pathconf).

Oops, braino on my part.

> But looking at it I found that alpha/*pathconf.c is bogus, not just alpha
> but all linux platforms support files >= 2GB on some filesystems.

Ok, but this changes the answers seen now and I don't know what users expect.

I like your changes to make the code generic, but the exact values you use
are wrong.  I think users will expect to see 32 or 64 and not anything
else.  FILESIZEBITS is not specified as the exact log2 of the maximum file
size, but rather as the minimum number of bits needed to represent *as a
signed integer* the maximum file size.  So, for 2GB files it needs to be
32, not 31--moreover, POSIX.1 specifies that 32 is the minimum value an
implementation can define.  It would meet the spec to return 42 when the
max size if 2^41-1, but I think it's a better plan to return 64, and in the
general case to return the bitcount of the off_t equivalent type
appropriate for the filesystem rather than its internal storage format limit.

> Looking at the kernel, it is really a mess to find out what the maximum
> filesizes are, but I've at least tried. Ideally kernel would implement
> itself *pathconf (and even then s_maxbytes would have to be cleaned up).

We are all agreed here, but the kernel people never helped in the past.

  reply	other threads:[~2002-10-18 18:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-18 11:59 Jakub Jelinek
2002-10-18 12:04 ` Roland McGrath [this message]
2002-10-18 12:53 ` 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=200210181859.g9IIx4500417@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=drepper@redhat.com \
    --cc=jakub@redhat.com \
    --cc=libc-hacker@sources.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 read-only IMAP folder(s) and NNTP newsgroup(s).