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

FLR: time-only setattr reaches the objects of one mirror only

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      On a mirrored (FLR) file, a setattr that only changes timestamps goes to the objects of one mirror: lov_io_mirror_init() picks a single mirror (the designated or preferred one) for every I/O type, CIT_SETATTR included, and lov_io_iter_init() only creates sub-I/Os for the components of that mirror.

      So the OST objects of the other mirrors keep their own mtime and atime. After "lfs mirror resync" the resynced mirror's objects have the time of the copy, and the timestamps that lfs restores at the end of the resync reach only one mirror. When the other mirror is later split off ("lfs mirror split -d"), stat() shows the time of the copy instead of the file's mtime. The same happens whenever a later stat() is served from a mirror that did not get the setattr.

      This shows up in sanity-flr test_61b once "lfs mirror extend" adds the mirror in place and resyncs it (LU-15834), and fails in about 1 of 3 runs. With the old volatile file and merge, the volatile file got the timestamps before the merge, so it was not visible.

      Proposed fix: for a CIT_SETATTR that is neither a truncate nor a fallocate (time or attribute only), send the setattr to the objects of every mirror, not only the one picked for I/O.

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: