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

FLR: mirror delete with the file itself as the victim fails with -EINVAL

XMLWordPrintable

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

      lfs mirror split -d first tries to destroy the mirror in place: the victim fd is the file itself (fd == fdv, the "purge" path). On master the MDS refuses that with -EINVAL:

      mdd_xattr_split() -> lod_declare_xattr_set() -> lod_save_layout_gen_intrans()
      "gen changed from 5 to 6 in trans declaration"
      

      The check comes from LU-17048 (2023). The split modifies the layout of the same object twice while the transaction is declared, so the second declare sees a new generation.

      lfs hides this. On -EINVAL or -EBUSY it assumes an old MDS ("could be old MDS which prohibit fd==fdv") and retries with a volatile file in the parent directory. So the in-place path, which needs no parent directory access, never works on a current MDS. A caller without a lfs-style fallback gets -EINVAL.

      Found while writing llapi_mirror_split() for lfu-purge (LU-20462), on master with a 2-mirror file.

            wc-triage WC Triage
            hnishida Hiroshi Nishida
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: