From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: NFSv4/pNFS possible POSIX I/O API standards Date: Sat, 2 Dec 2006 17:52:04 -0800 Message-ID: <20061203015203.GA5656@schatzie.adilger.int> References: <20061128055428.GA29891@infradead.org> <20061129090450.GA16296@infradead.org> <20061129094815.GE6429@schatzie.adilger.int> <1164795522.7557.45.camel@imp.csi.cam.ac.uk> <20061129082622.GA20285@cynthia.pants.nu> <20061130092548.GA1534@infradead.org> <1164950795.5761.25.camel@lade.trondhjem.org> <1164984094.5761.86.camel@lade.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sage Weil , Christoph Hellwig , Brad Boyer , Anton Altaparmakov , Gary Grider , linux-fsdevel@vger.kernel.org Return-path: Received: from mail.clusterfs.com ([206.168.112.78]:11491 "EHLO mail.clusterfs.com") by vger.kernel.org with ESMTP id S1758566AbWLCBwH (ORCPT ); Sat, 2 Dec 2006 20:52:07 -0500 To: Trond Myklebust Content-Disposition: inline In-Reply-To: <1164984094.5761.86.camel@lade.trondhjem.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Dec 01, 2006 09:41 -0500, Trond Myklebust wrote: > 'ls --color' and 'find' don't give a toss about most of the arguments > from 'stat()'. They just want to know what kind of filesystem object > they are dealing with. We already provide that information in the > readdir() syscall via the 'd_type' field. That is _almost_ true, except that "ls --color" does a stat anyways to get the file mode (to set the "*" executable type) and the file blocks (with -s) and the size (with -l) and the inode number (with -i). In a clustered filesystem getting the inode number and mode is easily done along with the uid/gid (for many kinds of "find") while getting the file size may be non-trivial. Just to be clear, I have no desire to include any kind of "synchronization" semantics to readdirplus() that is also being discussed in this thread. Just the ability to bundle select stat info along with the readdir information, and to allow stat to not return any unnecessary info (in particular size, blocks, mtime) that may be harder to gather on a clustered filesystem. Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.