Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755004AbYHLWFA (ORCPT ); Tue, 12 Aug 2008 18:05:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752717AbYHLWEi (ORCPT ); Tue, 12 Aug 2008 18:04:38 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:33083 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133AbYHLWEh (ORCPT ); Tue, 12 Aug 2008 18:04:37 -0400 Date: Tue, 12 Aug 2008 15:04:05 -0700 (PDT) From: Linus Torvalds To: Al Viro cc: OGAWA Hirofumi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] readdir mess In-Reply-To: <20080812215441.GY28946@ZenIV.linux.org.uk> Message-ID: References: <20080812062241.GQ28946@ZenIV.linux.org.uk> <87ej4u9nf5.fsf@devron.myhome.or.jp> <87proe81c1.fsf@devron.myhome.or.jp> <20080812205943.GX28946@ZenIV.linux.org.uk> <20080812215441.GY28946@ZenIV.linux.org.uk> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1647 Lines: 41 On Tue, 12 Aug 2008, Al Viro wrote: > On Tue, Aug 12, 2008 at 02:24:04PM -0700, Linus Torvalds wrote: > > > > You'd truncate the inode number. What's the big deal? Inode numbers aren't > > that important - they're just about the _least_ important part of the data > > returned for a readdir. > > Tell that to tar(1) ;-) The thing is, you still have the low 32 (or 16) bits, so even tar is better off most of the time. Let's face it, we actually always truncate things as-is. What are inode numbers on NFS but truncated file handles? And the other side of the coin is that legacy binaries are almost never _system_ binaries. You upgrade those with your system They are some odd special-purpose thing. > Anyway, the point for getdents() is simply that we *do* return an error; it's > just that it ends up with -EINVAL instead of -EOVERFLOW, and that's simply > bogus - we should either truncate silently or return the right value. The > code definitely intends to do the latter and fucks up. I agree. However, the reason it f*cks up is exactly the fact that we have two different error numbers, which was why I suggested that if we really want to fix this problem and are talking about cleaning things up, then _that_ should be our primary place to look at. Yes, it implies fixing and checking a lot of low-level filesystems. I agree. It's easier to just leave it be. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/