Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14493

return only existing objects from mdt_object_find()

    XMLWordPrintable

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

          Activity

            People

              tappro Mikhail Pershin
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: