Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a way to reduce # of fnodes when mounting filesystems #74

Open
danielinux opened this issue Aug 6, 2016 · 5 comments
Open

Find a way to reduce # of fnodes when mounting filesystems #74

danielinux opened this issue Aug 6, 2016 · 5 comments
Assignees
Labels

Comments

@danielinux
Copy link
Contributor

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.

@danielinux danielinux added this to the Storage improvements milestone Aug 6, 2016
acardace added a commit that referenced this issue Aug 26, 2017
WARNING! Doesn't play nice with commands like 'ls'
because fnode loading happens when fno_search() is called and
readdir_r() bypass such call.
@acardace
Copy link
Member

@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?

@danielinux
Copy link
Contributor Author

@brabo
Copy link
Member

brabo commented Aug 27, 2017

and opendir does call fno_search, so before readdir the loading has happened unless I am missing something.

@acardace
Copy link
Member

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.

@acardace acardace self-assigned this Aug 30, 2017
@brabo
Copy link
Member

brabo commented Aug 30, 2017

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?

acardace added a commit that referenced this issue Sep 2, 2017
WARNING! Doesn't play nice with commands like 'ls'
because fnode loading happens when fno_search() is called and
readdir_r() bypass such call.

WIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants