glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

inode_link() improvements

Open mykaul opened this issue 3 years ago • 4 comments

  • [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.

mykaul avatar Feb 08 '22 19:02 mykaul

  • 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

black-dragon74 avatar Feb 09 '22 15:02 black-dragon74

  • 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

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.

mykaul avatar Feb 09 '22 15:02 mykaul

Hi @black-dragon74 - https://github.com/gluster/glusterfs/pull/3226 is the pull request with all the changes listed above.

mykaul avatar Feb 11 '22 11:02 mykaul

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.

stale[bot] avatar Sep 21 '22 00:09 stale[bot]

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.

stale[bot] avatar Nov 01 '22 21:11 stale[bot]

Hoping to get this reviewed.

mykaul avatar Nov 02 '22 09:11 mykaul

https://github.com/gluster/glusterfs/pull/3226 will hopefully get in.

mykaul avatar Nov 02 '22 09:11 mykaul

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.

stale[bot] avatar Jun 10 '23 16:06 stale[bot]