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

First write RPC may set stale ownership to the OST object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      When the first write RPC arrives OST, it calls ofd_write_attr_set() -> ofd_attr_handle_ugid() to check if S_ISUID or S_ISGID is present, if the flag is present, it assumes the object is just pre-created without proper uid/gid setting, and it'll set the uid/gid carried from client to initialize the ownership of the object.

      However, there isn't any locking in ofd_attr_handle_ugid() to serialize the ownership changing by first write and real chown/chgrp calls, that could lead to the first write overwrite the correct ownership set by chown/chgrp with stale one.

      I think a ofd_write_lock() could be introduced in ofd_attr_handle_ugid() to eliminate such race.

      Attachments

        Activity

          People

            niu Niu Yawei (Inactive)
            niu Niu Yawei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: