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

the data version doesn't always change after a layout swap

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Severity:
      3
    • Rank (Obsolete):
      9223372036854775807

      Description

      After a successful layout swap, the data version of a file is sometimes not changed.

      llapi_get_data_version(fd1, &dv1, LL_DV_RD_FLUSH);  -> get data version
      llapi_fswap_layouts(fd1, fd2, ....) -> success
      lapi_get_data_version(fd1, llapi_get_data_version(fd1, &dv1, LL_DV_RD_FLUSH);  -> get same data version
      

      Sometimes the dataversion is different, and sometimes it is not. So some caching might be involved.

      I added some calls to sync() and fsync() on both file descriptors just after the call to layout swap, but that didn't fix the problem.

      I pushed a reproducer in http://review.whamcloud.com/#/c/13441/. Change "#if 0" to "#if 1" in swap_layout_test.c:test42(). The calls to tests 30 and 31 should be commented out too since they are not related and take too long to execute.

      	if (0) PERFORM(test30);
      	if (0) PERFORM(test31);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hdoreau Henri Doreau (Inactive)
                Reporter:
                fzago Frank Zago
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: