LWN.net Logo

"one file per block would be silly"

"one file per block would be silly"

Posted Mar 19, 2010 14:00 UTC (Fri) by nix (subscriber, #2304)
In reply to: "one file per block would be silly" by smurf
Parent article: A critical look at sysfs attribute values

Uh, the syscall underlying readdir() (getdents()) reads a whole bunch of entries at once, so you don't need 3000 syscalls to readdir() through 3000 names. If you want to stat() them, then you're right: but all you need to do in this case is get their names, which is much faster.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds