Skip to content

Commit

Permalink
DAOS-16272 dfs: fix get_info returning incorrect oclass (#15048)
Browse files Browse the repository at this point in the history
If user creates a container without --file-oclass, the get_info call was
returning the default oclass of a directory on daos fs get-attr. Fix
that to properly use the enum types for default scenario.

Signed-off-by: Mohamad Chaarawi <[email protected]>
  • Loading branch information
mchaarawi authored Sep 2, 2024
1 parent e6be2a6 commit 46e6383
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/client/dfs/obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ dfs_obj_get_info(dfs_t *dfs, dfs_obj_t *obj, dfs_obj_info_t *info)
if (dfs->attr.da_dir_oclass_id)
info->doi_dir_oclass_id = dfs->attr.da_dir_oclass_id;
else
rc = daos_obj_get_oclass(dfs->coh, 0, 0, 0,
rc = daos_obj_get_oclass(dfs->coh, DAOS_OT_MULTI_HASHED, 0, 0,
&info->doi_dir_oclass_id);

if (dfs->attr.da_file_oclass_id)
info->doi_file_oclass_id = dfs->attr.da_file_oclass_id;
else
rc = daos_obj_get_oclass(dfs->coh, 0, 0, 0,
rc = daos_obj_get_oclass(dfs->coh, DAOS_OT_ARRAY_BYTE, 0, 0,
&info->doi_file_oclass_id);

if (rc) {
D_ERROR("daos_obj_get_oclass() failed " DF_RC "\n", DP_RC(rc));
return daos_der2errno(rc);
Expand Down

0 comments on commit 46e6383

Please sign in to comment.