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

filter_handle_precreate()) ASSERTION(diff >= 0) failed

    XMLWordPrintable

Details

    • 3
    • 4543

    Description

      It seems my async journal code for 2.0 port had a bug in it regarding recovery.

      When the object is not created we try to recreate it, but we also need to set a recreate flag.

      The solution is something like this. In filter_preprw_write:

                              if (oa == NULL) {
                                      OBDO_ALLOC(noa);
                                      if (noa == NULL)
                                              GOTO(recreate_out, rc = -ENOMEM);
                                      noa->o_id = obj->ioo_id;
                                      noa->o_valid = OBD_MD_FLID;
                              }
      +                if ((oa->o_valid & OBD_MD_FLFLAGS) == 0) {
      +                        oa->o_valid |= OBD_MD_FLFLAGS;
      +                        oa->o_flags = OBD_FL_RECREATE_OBJS;
      +                } else {
      +                        oa->o_flags |= OBD_FL_RECREATE_OBJS;
      +                }
      
                              if (filter_create(exp, noa, NULL, oti) == 0) {
      

      Without it we always end up in precreate code that tries to allocate multiple objects and if we happen to allocate below last_id (which should be pretty rare I guess? I cannot come with any very plausible scenarios, but it does happen apparently), this assertion triggers as the result.

      Attachments

        Issue Links

          Activity

            People

              yujian Jian Yu
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: