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

sub object held by master object will stop it to be released

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • Lustre 2.8.0
    • Lustre 2.7.0
    • None
    • 3
    • 9223372036854775807

    Description

      Sub stripe object will be holded by master object until the master object is freed. (lod_object_free()->lod_object_free_striping()

      void lod_object_free_striping(const struct lu_env *env, struct lod_object *lo)
      {
              int i; 
               
              if (lo->ldo_dir_stripe != NULL) {
                      OBD_FREE_PTR(lo->ldo_dir_stripe);
                      lo->ldo_dir_stripe = NULL;
              }
              
              if (lo->ldo_stripe) {
                      LASSERT(lo->ldo_stripes_allocated > 0);
      
                      for (i = 0; i < lo->ldo_stripenr; i++) {
                              if (lo->ldo_stripe[i])
                                      lu_object_put(env, &lo->ldo_stripe[i]->do_lu);
                      }
      
                      i = sizeof(struct dt_object *) * lo->ldo_stripes_allocated;
                      OBD_FREE(lo->ldo_stripe, i);
                      lo->ldo_stripe = NULL;
                      lo->ldo_stripes_allocated = 0;
              }
              ............
      

      So the master object (of striped directory) should be freed immediately once the ref count reach to 0.

      Attachments

        Activity

          [LU-6479] sub object held by master object will stop it to be released

          Alex, should this ticket be reopened to track the issues you described? Otherwise they will be lost.

          adilger Andreas Dilger added a comment - Alex, should this ticket be reopened to track the issues you described? Otherwise they will be lost.

          I think it'd be good to keep around as a possible enhancement at least. there are few reasons for that:
          1) OSP objects aren't needed most of time (only at create/unlink/chown), so currently we just waste memory
          2) there is an issue with declared striping changing from declare to execution - to work this around we had to introduce additional locking in MDD (or MDT, don't remember exactly). now, with lod_thandle declare can prepare striping for its own use and don't race with other threads. I find this very important.

          bzzz Alex Zhuravlev added a comment - I think it'd be good to keep around as a possible enhancement at least. there are few reasons for that: 1) OSP objects aren't needed most of time (only at create/unlink/chown), so currently we just waste memory 2) there is an issue with declared striping changing from declare to execution - to work this around we had to introduce additional locking in MDD (or MDT, don't remember exactly). now, with lod_thandle declare can prepare striping for its own use and don't race with other threads. I find this very important.
          di.wang Di Wang added a comment -

          Hmm, had a few discussion with Alex about this. And probably we should just close the ticket for now, since there are no good reason to release the sub object when destroy the master object. And the original problem I met because of this seems gone in my new test. So let's close this one for now. And if it is necessary, I will reopen the ticket with better reason.

          di.wang Di Wang added a comment - Hmm, had a few discussion with Alex about this. And probably we should just close the ticket for now, since there are no good reason to release the sub object when destroy the master object. And the original problem I met because of this seems gone in my new test. So let's close this one for now. And if it is necessary, I will reopen the ticket with better reason.

          Any update on this bug and related patch? Is this needed for proper functionality in 2.8.0 or is it just a code cleanup? What causes this bug to be hit and what is the impact (e.g. hit during normal usage and LBUG, or hit during racer and MDS can't be shut down cleanly at the end)?

          adilger Andreas Dilger added a comment - Any update on this bug and related patch? Is this needed for proper functionality in 2.8.0 or is it just a code cleanup? What causes this bug to be hit and what is the impact (e.g. hit during normal usage and LBUG, or hit during racer and MDS can't be shut down cleanly at the end)?

          wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/14511
          Subject: LU-6479 lod: free the striped object immediately
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 22872cf7b6d776e2ae7e5115e5588fb47b868055

          gerrit Gerrit Updater added a comment - wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/14511 Subject: LU-6479 lod: free the striped object immediately Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 22872cf7b6d776e2ae7e5115e5588fb47b868055

          People

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

            Dates

              Created:
              Updated:
              Resolved: