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

osd_obj_map_recover() has to restart transaction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • Upstream
    • None
    • 3
    • 9223372036854775807

    Description

      osd_obj_map_recover() may stop current transaction to call vfs_unlink(), then continue to modify filesystem with no transaction:

                      ldiskfs_journal_stop(jh);
      
                      rc = -EEXIST;
                      /* If the src object has never been modified, then remove it. */
                      if (inode->i_size == 0 && inode->i_mode & S_ISUID &&
                          inode->i_mode & S_ISGID) {
                              rc = ll_vfs_unlink(src_parent, src_child);
                              if (unlikely(rc == -ENOENT))
                                      rc = 0;
                      }
                      if (rc)
                              RETURN(rc);
              }
      
              bh = osd_ldiskfs_find_entry(src_parent, &src_child->d_name, &de,
                                          NULL, NULL);
              if (unlikely(IS_ERR(bh)))
                      GOTO(unlock, rc = PTR_ERR(bh));
      
              rc = ldiskfs_delete_entry(jh, src_parent, de, bh);
      

      Attachments

        Issue Links

          Activity

            People

              bzzz Alex Zhuravlev
              bzzz Alex Zhuravlev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: