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

Incorrect identification of anonymous dentry as root under SLES11SP2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.5.0
    • Lustre 2.4.0
    • 3
    • 8761

    Description

      When attempting to export Lustre 2.4 via NFS with SLES11SP2, we ran in to an issue (See LU-3483 as well for another) where Lustre identifies anonymous dentries as root dentries and bugs when calling ll_invalidate_aliases.

      Here's the code in question (from ll_invalidate_aliases in lustre/llite/dcache.c):

      if (dentry->d_name.len == 1 && dentry->d_name.name[0] == '/') {
                              CERROR("called on root (?) dentry=%p, inode=%p "
                                     "ino=%lu\n", dentry, inode, inode->i_ino);
                              lustre_dump_dentry(dentry, 1);
                              libcfs_debug_dumpstack(NULL);
                      }
      

      The problem is a change in d_obtain_alias that's been made in SLES11SP2. Here's where anonymous dentries are named, this is from d_obtain_alias in CentOS6.4 or SLES11SP1:

              static const struct qstr anonstring = { .name = "" };
              :
              :
              tmp = d_alloc(NULL, &anonstring);
      

      In SLES11SP2, it's this:

              static const struct qstr anonstring = { .name = "/", .len = 1 };
      
              tmp = d_alloc(NULL, &anonstring);
      

      As you can see, that looks like a root dentry to the check being done by Lustre. There's a comment just above saying this was the intention:

       * This alias can sometimes be seen by prepend_path, so make it look
       * the same as a d_alloc_root alias.
       */
      

      [The commit is recorded here: http://kernel.opensuse.org/cgit/kernel-source/commit/?id=f9a956fc1dc4b5271662736b5016324d43b1b99f
      and appears to be SLES specific.]

      Ideally, Lustre would find another way to identify the root dentry here. I have simply commented out this check while doing further testing, but I'd like to understand:
      Is there a reason Lustre can't use the same method to see if a dentry is root as the kernel does?
      IE:

      #define IS_ROOT(x) ((x) == (x)->d_parent)
      

      If so, I'd suggest that.

      Attachments

        Activity

          People

            bogl Bob Glossman (Inactive)
            paf Patrick Farrell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: