07-25-2018, 07:05 PM
(07-25-2018, 06:12 PM)duke.g Wrote: The order is given by the natural directory order as can be seen by:
ls -lU /var/lib/mpd/playlists/
...
Quote:
Modern Linux (ext4) adds a B-tree index for file lists. One of his effect is default files order depends on a hash of their names.
To disable this feature use :
Quote:tune2fs -O^dir_indexBut I don't know, what this really does. Perhaps someone knows.
Regards
Duke.g
Good observation about the "natural" order.
The man page for tune2fs says that setting the dir_index parameter means "Use hashed b-trees to speed up lookups for large directories". Apparently, the ext4 filesystem is the first in which this parameter is enabled by default.
What qualifies as a large directory? Don't know. Will unsetting the parameter result in an ordering you like? Don't know. Will it result in a noticeable slowdown using the filesystem? Don't know. Does unsetting it mean the filesystem has to be forceably reindexed before it can be used? Don't know.
Regards,
Kent