From 6faefb815b40c358de472a188d8ea5ab49e683cc Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Fri, 30 Aug 2024 15:40:50 +0000 Subject: [PATCH] DAOS-16272 dfs: fix get_info returning incorrect oclass 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. Required-githooks: true 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 a9dd6d6f51f..309439bc807 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);