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

lockless IO does not update inode timestamps

Details

    • 3
    • 10036

    Description

      In osc_io_read_start() and osc_io_write_start() if the lockless IO bit is set in the osc_io then the inode timestamps are not updated by the IO. Is there any reason for this?

      In osc_io_write_start() we have the following unnecessary attr get before we set the m- and c-times?

                      result = cl_object_attr_get(env, obj, attr);
                      if (result == 0) {
      			attr->cat_mtime = attr->cat_ctime =
                                      LTIME_S(CFS_CURRENT_TIME);
                              result = cl_object_attr_set(env, obj, attr,
                                                          CAT_MTIME | CAT_CTIME);
                      }
      

      Attachments

        Issue Links

          Activity

            [LU-3868] lockless IO does not update inode timestamps
            pjones Peter Jones added a comment -

            Landed for 2.5.2 and 2.6

            pjones Peter Jones added a comment - Landed for 2.5.2 and 2.6
            spimpale Swapnil Pimpale (Inactive) added a comment - Patch: http://review.whamcloud.com/8797

            There is no requirement that the server clocks are in sync with the client clocks, so all file timestamps should be generated by the client. In the case of lockless IO, there should be a timestamp update sent by the client with each RPC, regardless of whether it is cached under a DLM lock by the client or not.

            adilger Andreas Dilger added a comment - There is no requirement that the server clocks are in sync with the client clocks, so all file timestamps should be generated by the client. In the case of lockless IO, there should be a timestamp update sent by the client with each RPC, regardless of whether it is cached under a DLM lock by the client or not.

            timestamps cached on client, as well as other attributes, have no sense without locks, so no need to set it for lockless IO, client just passes attributes to server.
            if there is a raced locked IO, its lock will be cancelled by server-side lock taken by lockless IO and next attempt of acquiring a lock will bring proper attributes on client.
            btw, it concerns truncate as well.

            vitaly_fertman Vitaly Fertman added a comment - timestamps cached on client, as well as other attributes, have no sense without locks, so no need to set it for lockless IO, client just passes attributes to server. if there is a raced locked IO, its lock will be cancelled by server-side lock taken by lockless IO and next attempt of acquiring a lock will bring proper attributes on client. btw, it concerns truncate as well.
            jhammond John Hammond added a comment -

            Vladimir and Vitaly, I see that you wrote and inspected this code. Could you explain why we would not update timestamps for lockless IO?

            jhammond John Hammond added a comment - Vladimir and Vitaly, I see that you wrote and inspected this code. Could you explain why we would not update timestamps for lockless IO?

            People

              wc-triage WC Triage
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: