LWN.net Logo

Widening ext4's readdir() cookie

Widening ext4's readdir() cookie

Posted Apr 4, 2013 19:40 UTC (Thu) by aakef (guest, #38030)
Parent article: Widening ext4's readdir() cookie

> adding such a mapping to ext4 (which does not otherwise need it) would be > a large job.

I think "which does not otherwise need it" is not absolutely correct. Ext4s HTREE/dirindex readdir has another issue. Entries are not returned in inode, but in hash order and for example for 'ls -l' (readdir + stat) or 'rm -rf dir' that causes lots of random disk access. Recent core utils try to eliminate this by sorting results returned by readdir(), but that logic is not used by everything. Depending on the implementation "such a mapping" from above would also eliminate the random access problem at all.

Bernd


(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