inode_link() improvements
-
[x] improve dentry_create()
-
Use mem_get() instead of mem_get0(), as we populate all fields.
-
Populate all fields, in the order they appear in the structure.
-
[x] Fix inode_hash() - no need to del anything - it's empty already.
-
[x] Fix __dentry_hash() - no need to del anything - it's empty already.
-
[x] Extract checks outside the lock, before the action
-
[x] Move the error logging to a different function.
- improve dentry_create()
Adding to your observations, If *name is already null we can save quite a lot of operations. Or is it like we have to return NULL only when strdup fails for some reason? Adding a check for if the name is NULL won't hurt in any case, right?
Regards
- improve dentry_create()
Adding to your observations, If
*nameis already null we can save quite a lot of operations. Or is it like we have to return NULL only when strdup fails for some reason? Adding a check for if the name is NULL won't hurt in any case, right?Regards
I don't see why name would be NULL, apart from the call @ __inode_table_init_root(), which I assume is not called too often.
Hi @black-dragon74 - https://github.com/gluster/glusterfs/pull/3226 is the pull request with all the changes listed above.
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.
Hoping to get this reviewed.
https://github.com/gluster/glusterfs/pull/3226 will hopefully get in.
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.