glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

inode.c: small improvements

Open mykaul opened this issue 3 years ago • 3 comments

Reduce work under the table lock mainly, with fetching 'THIS' outside the lock, checking if it's the root inode outside (in inode_ref/unref code for example) and so on.

mykaul avatar Jan 26 '22 07:01 mykaul

@mykaul Are you working on this? If not, I can work on these changes.

black-dragon74 avatar Jan 27 '22 08:01 black-dragon74

Yes, of course @black-dragon74 - enjoy! I have some idea and some in the works patch for reducing work under lock for inode_unref() but otherwise there's more to do.

mykaul avatar Feb 02 '22 19:02 mykaul

Another item:

inode_path(inode_t *inode, const char *name, char **bufp)

Could be changed to actually instead of returning 'ret', returning 'bufp' - if it's NULL, the function failed, otherwise, it succeeded.

(just like other places in the code - functions can under certain condition just return the relevant object instead of a ret code. If it's NULL, it's no use to us and the function failed).

mykaul avatar Sep 12 '22 08:09 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 May 21 '23 18:05 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 Jun 11 '23 09:06 stale[bot]