Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
In almost every place where we call mdt_object_find() we expect that the object exists. So lets check mdt_object_exists() before returning from mdt_object_find() and return ERR_PTR(-ENOENT) if it doesn't.
For the few remaining cases where it's OK for the object not to exist. We should have a new function. This save typing and prevent failed ASSERTION( ((o)>lo_header>loh_attr & LOHA_EXISTS) != 0 ) assertions in places where people forgot to check if the object exists before calling lu_object_attr().
One way to do this would be to rename mdt_object_find() to mdt_object_find_nx() and then create a new mdt_object_find() that calls mdt_object_find_nx(), does the check, returns existing objects, puts non-existing objects, and returns appropriately.
Attachments
Issue Links
- is related to
-
LU-14494 check object existence in mdt_close_handle_layouts()
- Resolved