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

ll_hsm_import() calls ll_setattr_raw() without holding i_mutex

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.7.0, Lustre 2.5.3
    • Lustre 2.7.0, Lustre 2.5.3
    • 3
    • 15196

    Description

      ll_hsm_import() calls ll_setattr_raw() without holding the inode mutex but when called on a non-directory ll_setattr_raw() will unlock and relock the inode. For whatever reason a spurious unlock followed by a lock doesn't restore the balance of the universe. To see this observe that the following rm will hang in vfs_unlink() trying the lock the inode mutex:

      # echo XXX > /tmp/hsm_root/f0
      # lhsmtool_posix --archive=0 --hsm-root=/tmp/hsm_root/ --import f0 /mnt/lustre/f0 /mnt/lustre
      lhsmtool_posix[4833]: action=1 src=f0 dst=/mnt/lustre/f0 mount_point=/mnt/lustre
      lhsmtool_posix[4833]: importing '/mnt/lustre/f0' from '/tmp/hsm_root//f0'
      lhsmtool_posix[4833]: imported '/mnt/lustre/f0' from '/tmp/hsm_root//0002/0000/0400/8000/0002/0000/0x280000400:0x2:0x0'=='/tmp/hsm_root//f0'
      lhsmtool_posix[4833]: process finished, errs: 0 major, 0 minor, rc=0 (Success)
      # rm /mnt/lustre/f0
      
      

      Attachments

        Activity

          People

            jhammond John Hammond
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: