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

refresh link after update linkea in mdd_migration_update_name()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.8.0
    • Lustre 2.8.0
    • None
    • 3
    • 9223372036854775807

    Description

      In mdd_migrate_update_name()

              if (ldata->ld_buf != NULL) {
                      rc = mdd_update_linkea(env, mdd_pobj, mdd_sobj, mdd_tobj,
                                             handle, lname, ldata);
                      if (rc != 0)
                              GOTO(stop_trans, rc);
                                --------------> Since mdd_update_linkea might change the link of source file, we should re_get attr, otherwise the following DELETE lovEA might check with wrong nlink.  
              }
      
              if (S_ISREG(so_attr->la_mode)) {
                      if (so_attr->la_nlink == 1) {
                              rc = mdo_xattr_del(env, mdd_sobj, XATTR_NAME_LOV,
                                                 handle);
                              if (rc != 0 && rc != -ENODATA)
                                      GOTO(stop_trans, rc);
      
                              rc = mdo_xattr_set(env, mdd_tobj, NULL,
                                                 XATTR_NAME_FID,
                                                 LU_XATTR_REPLACE, handle);
                              if (rc < 0)
                                      GOTO(stop_trans, rc);
                      }
              }
      
      

      Attachments

        Issue Links

          Activity

            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: