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

FastReg gaps detection is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Lustre 2.18.0
    • None
    • None
    • 3
    • 9223372036854775807

      kiblnd_setup_rd_kiov():

      fragnob = min((int)(kiov->bv_len - offset), nob);
      if ((fragnob < (int)(kiov->bv_len - offset)) &&
      nkiov < max_nkiov && nob > fragnob) {

      Let A = (int)(kiov->bv_len - offset); fragnob = min(A, nob);. There are two cases:

      1. A < nob
      • fragnob = A
      • if ((A < A) && ... -> False
      1. nob < A
      • fragnob = nob
      • if ((nob < A) && nkiov < max_nkiov && nob > nob) -> False

      The two clauses can never both hold. tx->tx_gaps = true exists in exactly one place (and that place is unreachable, so tx_gaps is permanently false.

      This means all downstream gap handling is dead:

      • -EPROTONOSUPPORT preemptive guard
      • FMR -EFBIG guard
      • FMR multi-fragment gap path (else branch)

      Gapped bulk transfers are never detected and never diverted; they fall through to ib_map_mr_sg, which short-maps and returns -EINVAL.

            hornc Chris Horn
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: