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

ldiskfs getdents() returns invalid d_types

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.6.0
    • Lustre 2.4.0
    • 3
    • 6955

    Description

      Note this is not a bug in lustre but in ldisks as a top level filesystem. The d_types returned have an extra bit set (perhaps from putting FIDs in dirents). The most annoying symptom of this is that it breaks find.

      # llmount.sh
      ...
      # mkdir -p /mnt/lustre/D/D/D/D/D/D
      # touch /mnt/lustre/D/D/D/D/D/D/XXX
      # find /mnt/lustre
      /mnt/lustre
      /mnt/lustre/.lustre
      /mnt/lustre/D
      /mnt/lustre/D/D
      /mnt/lustre/D/D/D
      /mnt/lustre/D/D/D/D
      /mnt/lustre/D/D/D/D/D
      /mnt/lustre/D/D/D/D/D/D
      /mnt/lustre/D/D/D/D/D/D/XXX
      # umount /mnt/lustre /mnt/mds1
      #
      # mount /tmp/lustre-mdt1 /mnt/mds1 -t ldiskfs -o loop,ro
      # find /mnt/mds1/ROOT -name XXX
      # stat /mnt/mds1/ROOT/D/D/D/D/D/D/XXX
        File: `/mnt/mds1/ROOT/D/D/D/D/D/D/XXX'
        Size: 0               Blocks: 0          IO Block: 4096   regular empty file
      Device: 700h/1792d      Inode: 111         Links: 1
      Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
      Access: 2013-02-26 21:37:51.000000000 -0600
      Modify: 2013-02-26 21:37:51.000000000 -0600
      Change: 2013-02-26 21:37:51.000000000 -0600
      # find /mnt/mds1/ROOT
      /mnt/mds1/ROOT
      /mnt/mds1/ROOT/.lustre
      /mnt/mds1/ROOT/D
      # sys_getdents --verbose /mnt/mds1/ROOT
      d_type =   4 (d), d_ino =                  2, d_off =  2085404527983360875, d_reclen =   24, d_name = '..'
      d_type =   4 (d), d_ino =              50013, d_off =  3188331865672730665, d_reclen =   24, d_name = '.'
      dirent '.lustre' has unknown d_type 20
      d_type =  20 (!), d_ino =              50014, d_off =  8374721202256512604, d_reclen =   32, d_name = '.lustre'
      dirent 'D' has unknown d_type 20
      d_type =  20 (!), d_ino =              50015, d_off =  9223372036854775807, d_reclen =   24, d_name = 'D'
      #
      # sys_getdents --verbose /mnt/mds1/ROOT/D/D/D/D/D/D/
      dirent '..' has unknown d_type 20
      d_type =  20 (!), d_ino =              50019, d_off =  2085404527983360875, d_reclen =   24, d_name = '..'
      d_type =   4 (d), d_ino =              50020, d_off =  6678178485617948048, d_reclen =   24, d_name = '.'
      dirent 'XXX' has unknown d_type 24
      d_type =  24 (!), d_ino =                111, d_off =  9223372036854775807, d_reclen =   24, d_name = 'XXX'
      

      Attachments

        Issue Links

          Activity

            People

              bogl Bob Glossman (Inactive)
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: