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

Kerberos support for kernel >= 2.6.24 is broken

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0
    • Lustre 2.3.0
    • Linux distributions running kernel >= 2.6.24

    Description

      Since kernel version 2.6.24 the scatterlist struct has no field "page".
      The related Lustre kerberos code in gss_krb5_mech.c is not working anymore,
      as for instance:

      static
      void buf_to_sg(struct scatterlist *sg, void *ptr, int len)
      {
      sg->page = virt_to_page(ptr);
      sg->offset = offset_in_page(ptr);
      sg->length = len;
      }

      access the field page in scatterlist struct.

      The new struct provided in the Linux kernel >= 2.6.24 is

      struct scatterlist {
      #ifdef CONFIG_DEBUG_SG
      unsigned long sg_magic;
      #endif
      unsigned long page_link;
      unsigned int offset;
      unsigned int length;
      dma_addr_t dma_address;
      unsigned int dma_length;
      };

      The problem can be fixed by using the scatterlist sg_set_page function, e.g:

      static
      void buf_to_sg(struct scatterlist *sg, void *ptr, int len)

      { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) + sg_set_page(sg, virt_to_page(ptr), + len, offset_in_page(ptr)); +#else sg->page = virt_to_page(ptr); sg->offset = offset_in_page(ptr); sg->length = len; +#endif }

      I will prepare a patch to fix this problem.

      Attachments

        Issue Links

          Activity

            People

              yong.fan nasf (Inactive)
              thomas.stibor Thomas Stibor
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: