From 3852642d49be0e320c7907894168c34ff870832a Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Mon, 2 Sep 2024 12:32:59 -0500 Subject: [PATCH] DAOS-16272 dfs: fix get_info returning incorrect oclass (#15048) 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 --- src/client/dfs/obj.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/dfs/obj.c b/src/client/dfs/obj.c index 024a230268d..92fe39f529b 100644 --- a/src/client/dfs/obj.c +++ b/src/client/dfs/obj.c @@ -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);