Open danielinux opened 8 years ago
@danielinux @brabo what do you think? the problem here is obvious... any feedback on how to get around this? what does readdir_r() call behind the curtain?
and opendir does call fno_search, so before readdir the loading has happened unless I am missing something.
opendir() just does fno_search on the directory file, it doesn't look for the files inside the directory, that's why it doesn't work just like this.
if lookup is called with a directory it would populate that on FS level. i am not sure i see any problem. the thing i wonder is though, if opendir is called on say '/mnt/sub1/sub2/sub3/sub4', what exactly do we want/need to cache from lookup? that whole tree and their contents?
When a filesystem is mounted, frosted scans the whol content and creates fnodes accordingly.
Perhaps the fnodes should only be allocated during lookup (fno_search), or when opendir/readdir is called, in order to decrease the number of active fnodes, and the memory required.