Re: NFSv4/pNFS possible POSIX I/O API standards

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Dilger
Date: Wednesday, December 6, 2006 - 10:57 pm

On Dec 06, 2006  09:42 -0800, Ulrich Drepper wrote:

IMHO, once part of the information is optional, why bother making ANY
of it required?  Consider "ls -s" on a distributed filesystem that has
UID+GID mapping.  It doesn't actually NEED to return the UID+GID to ls
for each file, since it won't be shown, but if that is part of the 
"required" fields then the filesystem would have to remap each UID+GID
on each file in the directory.  Similar arguments can be made for "find"
with various options (-atime, -mtime, etc) where any one of the "required"
parameters isn't needed.

I don't think it is _harmful_ to fill in unrequested values if they are
readily available (it might in fact avoid a lot of conditional branches)
but why not let the caller request only the minimum information it needs?


That is my opinion also.  Lustre can do incredibly fast IO, but it isn't
very good at "ls" at all because it has to do way more work than you
would think (and I've stared at a lot of straces from ls, rm, etc).


I used to think this also, but even though Lustre supplies d_type info
GNU ls will still do stat operations because "ls --color" depends on
st_mode in order to color executable files differently.  Since virtually
all distros alias ls to "ls --color" this is pretty much default behaviour.
Another popular alias is "ls -F" which also uses st_mode for executables.

$ strace ls --color=yes		# this is on an ext3 filesystem
:
:
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
getdents64(3, /* 53 entries */, 4096)   = 1840
lstat64("ChangeLog", {st_mode=S_IFREG|0660, st_size=48, ...}) = 0
lstat64("install-sh", {st_mode=S_IFREG|0755, st_size=7122, ...}) = 0
lstat64("config.sub", {st_mode=S_IFREG|0755, st_size=30221, ...}) = 0
lstat64("autogen.sh", {st_mode=S_IFREG|0660, st_size=41, ...}) = 0
lstat64("config.h", {st_mode=S_IFREG|0664, st_size=7177, ...}) = 0
lstat64("COPYING", {st_mode=S_IFREG|0660, st_size=18483, ...}) = 0
:
:

Similarly, GNU rm will stat all of the files (when run as a regular user)
to ask the "rm: remove write-protected regular file `foo.orig'?" question,
which also depends on st_mode.


Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Mon Nov 27, 9:34 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Mon Nov 27, 10:54 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Tue Nov 28, 3:54 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Anton Altaparmakov, (Tue Nov 28, 4:28 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Nov 28, 8:08 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Russell Cattelan, (Tue Nov 28, 1:17 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Wendy Cheng, (Tue Nov 28, 4:28 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Brad Boyer, (Wed Nov 29, 1:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:04 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:12 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 2:14 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Nov 29, 2:48 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Anton Altaparmakov, (Wed Nov 29, 3:18 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Steven Whitehouse, (Wed Nov 29, 3:25 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Nov 29, 5:23 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Nov 29, 5:35 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 5:39 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Wed Nov 29, 9:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Wed Nov 29, 10:18 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Thu Nov 30, 2:25 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Thu Nov 30, 5:29 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Thu Nov 30, 10:49 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Thu Nov 30, 10:26 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 12:08 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 7:41 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ric Wheeler, (Fri Dec 1, 8:52 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 9:47 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 11:07 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 11:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Fri Dec 1, 12:13 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Fri Dec 1, 1:32 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Fri Dec 1, 3:29 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Fri Dec 1, 7:35 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 2, 6:52 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 2, 6:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Sun Dec 3, 9:10 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Mon Dec 4, 12:32 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Mon Dec 4, 8:15 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Mon Dec 4, 11:02 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Mon Dec 4, 5:37 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Mon Dec 4, 5:59 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Mon Dec 4, 9:44 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Mon Dec 4, 10:56 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:02 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:05 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:07 am)
Re: readdirplus() as possible POSIX I/O API, Andreas Dilger, (Tue Dec 5, 3:26 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Dec 5, 7:20 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Tue Dec 5, 7:37 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Tue Dec 5, 7:55 am)
Re: readdirplus() as possible POSIX I/O API, Trond Myklebust, (Tue Dec 5, 8:23 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Tue Dec 5, 9:47 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Tue Dec 5, 9:55 am)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Tue Dec 5, 10:01 am)
Re: Re: readdirplus() as possible POSIX I/O API, Latchesar Ionkov, (Tue Dec 5, 10:06 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 2:44 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Peter Staubach, (Tue Dec 5, 2:50 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 2:50 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:05 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Tue Dec 5, 3:11 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Christoph Hellwig, (Tue Dec 5, 3:12 pm)
Re: readdirplus() as possible POSIX I/O API, Rob Ross, (Tue Dec 5, 3:48 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Sage Weil, (Tue Dec 5, 4:18 pm)
Re: readdirplus() as possible POSIX I/O API, Sage Weil, (Tue Dec 5, 4:20 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Tue Dec 5, 4:24 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Tue Dec 5, 4:55 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, David Chinner, (Wed Dec 6, 2:48 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Dec 6, 3:06 am)
Re: readdirplus() as possible POSIX I/O API, Andreas Dilger, (Wed Dec 6, 3:28 am)
openg, Christoph Hellwig, (Wed Dec 6, 4:01 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 8:04 am)
Re: readdirplus() as possible POSIX I/O API, Trond Myklebust, (Wed Dec 6, 8:10 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Wed Dec 6, 8:14 am)
Re: openg, Trond Myklebust, (Wed Dec 6, 8:41 am)
Re: openg, Rob Ross, (Wed Dec 6, 8:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Wed Dec 6, 8:44 am)
Re: readdirplus() as possible POSIX I/O API, Peter Staubach, (Wed Dec 6, 8:48 am)
openg and path_to_handle, Rob Ross, (Wed Dec 6, 8:53 am)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 9:04 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 9:15 am)
Re: openg and path_to_handle, Rob Ross, (Wed Dec 6, 9:20 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 9:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 10:19 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Rob Ross, (Wed Dec 6, 10:27 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 10:42 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Wed Dec 6, 11:01 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Wed Dec 6, 11:13 am)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 1:40 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 1:50 pm)
Re: openg and path_to_handle, Rob Ross, (Wed Dec 6, 1:50 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 1:57 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 2:01 pm)
Re: openg and path_to_handle, David Chinner, (Wed Dec 6, 2:09 pm)
Re: openg and path_to_handle, Andreas Dilger, (Wed Dec 6, 3:09 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Wed Dec 6, 3:17 pm)
Re: openg and path_to_handle, Andreas Dilger, (Wed Dec 6, 3:41 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Wed Dec 6, 4:12 pm)
Re: openg and path_to_handle, Latchesar Ionkov, (Wed Dec 6, 4:19 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Latchesar Ionkov, (Wed Dec 6, 4:25 pm)
Re: openg, Christoph Hellwig, (Wed Dec 6, 4:32 pm)
Re: Re: NFSv4/pNFS possible POSIX I/O API standards, Trond Myklebust, (Wed Dec 6, 4:33 pm)
Re: openg and path_to_handle, Christoph Hellwig, (Wed Dec 6, 4:39 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Wed Dec 6, 10:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Nikita Danilov, (Thu Dec 7, 4:39 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 2:00 pm)
Re: openg and path_to_handle, Matthew Wilcox, (Thu Dec 14, 2:20 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 3:52 pm)
Re: openg and path_to_handle, Rob Ross, (Thu Dec 14, 4:02 pm)
Re: openg, Rob Ross, (Thu Dec 14, 4:36 pm)
statlite(), Rob Ross, (Thu Dec 14, 4:58 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Fri Dec 15, 3:37 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Andreas Dilger, (Sat Dec 16, 11:13 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sat Dec 16, 12:08 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Sun Dec 17, 7:41 am)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sun Dec 17, 12:07 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Matthew Wilcox, (Sun Dec 17, 12:38 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ulrich Drepper, (Sun Dec 17, 2:51 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Ragnar , (Sun Dec 17, 7:57 pm)
Re: NFSv4/pNFS possible POSIX I/O API standards, Gary Grider, (Sun Dec 17, 8:54 pm)