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

ll_ladvise_sanity() should return -EOPNOTSUPP for unknown advice

    XMLWordPrintable

Details

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

    Description

      The llapi_ladvise(8) man page documents ENOTSUPP for unsupported/unknown advice types. The ofd_ladvise_hdl() function will return this error for unknown advice types.

      However, the ll_ladvise_sanity() function on the client returns EINVAL in the case of unknown advice types. This should be made consistent with the documentation, and to allow the caller to distinguish between some advice type that isn't supported by the client or server (maybe handled with a fallback) and some invalid argument (bad value) that cannot really be fixed.

      It would actually be better to use EOPNOTSUPP to match other unsupported system calls, and to allow generating a useful error message from strerror(), instead of ENOTSUPP which is an NFS-specific error code.

      Also, I see that none of the LADVISE types are supported by the MDT. Should they be?

      Attachments

        Activity

          People

            emoly.liu Emoly Liu
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: