From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32729 invoked by alias); 26 Feb 2013 20:37:24 -0000 Received: (qmail 32603 invoked by uid 22791); 26 Feb 2013 20:37:21 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.cs.ucla.edu (HELO smtp.cs.ucla.edu) (131.179.128.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Feb 2013 20:37:15 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 1EDE739E8106; Tue, 26 Feb 2013 12:37:15 -0800 (PST) Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3Tj97xap+TmG; Tue, 26 Feb 2013 12:37:14 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 8CD7A39E8008; Tue, 26 Feb 2013 12:37:14 -0800 (PST) Message-ID: <512D1CF4.4080607@cs.ucla.edu> Date: Tue, 26 Feb 2013 20:37:00 -0000 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: Carlos O'Donell CC: GNU C Library , libc-ports@sourceware.org Subject: Re: [RFC] Copy as much as you can during a 32-bit stat before returning EOVERFLOW? References: <512D1335.1020704@redhat.com> In-Reply-To: <512D1335.1020704@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00064.txt.bz2 On 02/26/13 11:55, Carlos O'Donell wrote:> Community, > The correct solution is going to take time to implement Don't the proposed patches to xstatconv.c etc. slow down glibc slightly for the normal (successful) case? That's a minus. Here's a different idea: enable wide ino_t, time_t, etc. if _FILE_OFFSET_BITS is 64. This would require zero changes to applications that are portable and largefile aware, as they already define _FILE_OFFSET_BITS. And even for nonportable applications, compiling with -D_FILE_OFFSET_BITS=64 (and fixing any resulting porting glitches) should take less time and should be safer than modifying the applications to make the unportable assumption that a struct stat is filled in if errno == EOVERFLOW. A more-conservative variant of this idea would establish a new symbol that means "use wide-enough values for all file-related types". -D_WIDE_FILE_TYPES, say, would use wide types for off_t, time_t, ino_t, etc. Portable application developers could modify their code to set this symbol as well as setting _FILE_OFFSET_BITS, which is a bit of a hassle, but I've seen worse (e.g., Mac OS X uses _DARWIN_USE_64_BIT_INODE to select 64-bit inodes, but that's all it does -- yuck).