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

TCU: trusted.unrm xattr not visible due to client-side caching

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      This issue can be reproduced easily by the following test scripts, based on TCU code:

      lctl set_param mdd.*.trash_can_enable=1                                         
      lctl set_param mdd.*.trash_can_type=plain                                       
                                                                                      
      mnt=/mnt/lustre                                                                 
      mkdir $mnt/d                                                                    
      touch $mnt/d/f                                                                  
      rm $mnt/d/f                                                                     
                                                                                      
      ls -la $mnt/.lustre/trash/MDT0000/*/                                            
                                                                                      
      rm -r $mnt/d                                                                    
      getfattr -n trusted.unrm $mnt/.lustre/trash/MDT0000/*/d 
      

      You can see the error in the output, like:

      /mnt/lustre/.lustre/trash/MDT0000/0x200000007:0x1:0x0/d: trusted.unrm: No such attribute
      

      This happened because trusted.unrm was cached by the client. When ls accessed the stub directory, it cached the xattr list without trusted.unrm. After "rm -r $mnt/d", the new xattr was set on the server, but the client still used the stale cache.

      I will create a patch to fix.

      Attachments

        Activity

          People

            emoly.liu Emoly Liu
            emoly.liu Emoly Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: