-
Notifications
You must be signed in to change notification settings - Fork 306
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
DAOS-16924 dfs: new readdir API #15687
base: feature/dfs_dcache
Are you sure you want to change the base?
Conversation
Ticket title is 'add readdir api that uses a new DFS anchor' |
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15687/1/testReport/ |
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15687/2/testReport/ |
Test stage Functional on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15687/3/testReport/ |
Test stage Functional Hardware Large completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-15687/5/testReport/ |
ed233a5
to
cc3cadb
Compare
Add a new DFS readdir API that utilizes a new DFS anchor object which can be updated to include caching parameters for future calls. This API will be more useful when client side caching for readdir is implemented to access buckets of readdir entries. Required-githooks: true Signed-off-by: Mohamad Chaarawi <[email protected]>
cc3cadb
to
fa69eed
Compare
Test stage Unit Test on EL 8.8 completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-15687/6/display/redirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me.
Just minor questions.
@@ -990,3 +991,6 @@ drec_del(dfs_dcache_t *dcache, char *path, dfs_obj_t *parent) | |||
|
|||
return dcache->drec_del_fn(dcache, path, parent); | |||
} | |||
|
|||
// dcache_readdir(dfs_dcache_t *dcache, dfs_obj_t *obj, dfs_dir_anchor_t *anchor, struct dirent dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be usefull to add some comments on why this function declaration is commented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since i plan to add it next :-)
note this is all going to the feature branch, so this is just the first piece of the puzzle
/** if we did not enumerate anything, try again to make sure we hit EOF */ | ||
if (nr == 0) { | ||
if (daos_anchor_is_eof(&anchor->dda_anchor_int)) | ||
return -1; /** typically EOF code */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a stupid question but why not using EOF macro directly ?
return -1; /** typically EOF code */ | |
return EOF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can make that change in the follow on PR. i just wasn't sure if EOF was -1 on all linux platforms
if (dfs->dcache == NULL) | ||
return readdir_int(dfs, obj, &anchor->dda_anchor_int, 1, &dir, NULL); | ||
else | ||
dcache_readdir(dfs->dcache, obj, anchor, dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dir --> entry?
You can update it in future PR since the code is currently commented out.
#if 0 | ||
/** if no caching, just use the internal anchor with 1 entry */ | ||
if (dfs->dcache == NULL) | ||
return readdir_int(dfs, obj, &anchor->dda_anchor_int, 1, &dir, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dir --> entry?
This PR looks fine to me. |
Add a new DFS readdir API that utilizes a new DFS anchor object which can be updated to include caching parameters for future calls. This API will be more useful when client side caching for readdir is implemented to access buckets of readdir entries.
Required-githooks: true
Before requesting gatekeeper:
Features:
(orTest-tag*
) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.Gatekeeper: