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

Do not return -EAGAIN in lod_object_init

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.7.0
    • Lustre 2.7.0
    • None
    • 3
    • 16422

    Description

      Do not return EWOULDBLOCK (EAGAIN) in lod_object_init, since lu_object_find_at is using EAGAIN to check whether the object is dying and waiting the object to be released.

      struct lu_object *lu_object_find_at(const struct lu_env *env,
                                          struct lu_device *dev,
                                          const struct lu_fid *f,
                                          const struct lu_object_conf *conf)
      {
              struct lu_site_bkt_data *bkt;
              struct lu_object        *obj;
              wait_queue_t           wait;
      
              while (1) {
                      if (conf != NULL && conf->loc_flags & LOC_F_NOWAIT) {
                              obj = lu_object_find_try(env, dev, f, conf, NULL);
      
                              return obj;
                      }
      
                      obj = lu_object_find_try(env, dev, f, conf, &wait);
                      if (obj != ERR_PTR(-EAGAIN))  <--- Only wait here if the object is dying, obviously the failure(-EWOULDBLOCK) of lod_object_init should not wait here, otherwise it will cause list corruption.
                              return obj;
      

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              di.wang Di Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: