From d23aafe29498304a1a660f421595ed1d9c8c8855 Mon Sep 17 00:00:00 2001 From: Chen Wang Date: Fri, 28 Jul 2023 13:25:54 -0700 Subject: [PATCH] Do not assume file must exist after an open call Signed-off-by: Chen Wang --- client/src/unifyfs_fid.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/unifyfs_fid.c b/client/src/unifyfs_fid.c index c9df554d..9ea448ef 100644 --- a/client/src/unifyfs_fid.c +++ b/client/src/unifyfs_fid.c @@ -553,15 +553,15 @@ int unifyfs_fid_open( } } - /* File should exist at this point, - * update our cache with its metadata. */ + /* Update our cache with its metadata. */ ret = unifyfs_fid_fetch(client, path); if (ret != UNIFYFS_SUCCESS) { - /* Failed to get metadata for a file that should exist. - * Perhaps it was since deleted. We could try to create - * it again and loop through these steps, but for now - * consider this situation to be an error. */ - LOGERR("Failed to get metadata on existing file %s", path); + /* Failed to get metadata. + * Perhaps it was opened without O_CREAT or it + * was since deleted. For the latter, we could + * try to create it again and loop through these + * steps. */ + LOGDBG("Failed to get metadata on file %s", path); return ret; }