Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-18456 TCU: Trash Can/Undelete for Lustre
  3. LU-21128

TCU: stale negative dentry for .Trash entries on other clients after delete (no cache invalidation)

XMLWordPrintable

    • Icon: Technical task Technical task
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      Reproduced on hardware. AI400X3i HA pair vm00/vm01, b_es7_0 2.16.0-ddn63 (702f1d2). Found by sanity-tcu.sh test_81 (TCU, EX-428), using two mounts (/mnt/lustre, /mnt/lustre2).

      Problem

       

      echo x > $DIR/d/f
      ls $DIR2/d/.Trash
      # mount 2 looks up the virtual .Trash (empty)
      rm $DIR/d/f # mount 1 deletes; the object goes to trash
      ls $DIR2/d/.Trash/f
      ls: cannot access '/mnt/lustre2/d/.Trash/f': No such file or directory

      {{}}
      The second client keeps a negative or readdir-cached view of the virtual .Trash directory. Moving the object into the trash does not revoke any lock that protects that view. .Trash is virtual (built from the trash index by pFID), so no LDLM lock covers its contents on the parent directory.

      Same root cause, seen after MDT restart

      • After failing over MDT0000 and re-enabling TCU, ls $dir/.Trash kept returning ENOENT on the client.
      • The objects were present in .lustre/.ltrash.
      • The error cleared only after echo 3 > drop_caches plus lru_size=clear.

      Impact

      On multi-client systems, users on other nodes cannot see or restore their files until their caches happen to expire.

      Expected

      A delete into the trash, an unrm and a purge should invalidate .Trash lookup and readdir caches on all clients. For example:

      • take an UPDATE/LOOKUP ibits lock on the .Trash virtual FID and cancel it on change, or
      • do not cache .Trash entries at all.

      Test

      sanity-tcu.sh test_81: ".Trash cache coherency between clients".

            qian_wc Qian Yingjin
            qian_wc Qian Yingjin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: