| # lpt = # avol, # buf1 = EB_PAGE_SIZE, avol[m4] = mapped(buf2), bleb = buffered(m4), buf0 = buf, m = m3, m0 = EB_PAGE_SIZE, n = (wbuf.nbytes + n2) % m0, n0 = n1 - wbuf.nbytes, n1 = align↓(wbuf.nbytes + n2, m0), n2 = n3, ¬ rofs, wbuf = mkwbuf(buf1, m1, m2), m4 < # avol, ebm-vol-inv(avol), wbuf-cons(mkwbuf(buf1, m1, m2), mapped(buf2), rofs), wbuf.nbytes + n2 ≥ m0, n1 ≥ wbuf.nbytes, ¬ rofs → m1 + m2 + n3 ≤ LEB_SIZE ∧ n3 ≤ # buf ⊦ ⟪let buf = mkbuf(n1) in {buf := copy(wbuf.content, 0, buf, 0, wbuf.nbytes); buf := copy(buf0, 0, buf, wbuf.nbytes, n0); apersistence_io_write#(bleb.leb, wbuf.offset, 0, n1, buf, adr, m, plog, lpt, ns; avol; err); if err = ESUCCESS then {wbuf.content := copy(buf0, n0, wbuf.content, 0, n); wbuf.offset := wbuf.offset + n1; wbuf.nbytes := n} else rofs := true}⟫ (# wbuf.content = EB_PAGE_SIZE ∧ m4 < # avol ∧ wbuf-cons(wbuf, avol[m4], rofs) ∧ ebm-vol-inv(avol) ∧ # lpt = # avol), m0 = 0 |
# buf1 = EB_PAGE_SIZE, # lpt = # avol, avol[m4] = mapped(buf2), bleb = buffered(m4), buf = mkbuf(n1), buf0 = buf3, m = m3, m0 = EB_PAGE_SIZE, n = (wbuf.nbytes + n2) % m0, n0 = n1 - wbuf.nbytes, n1 = align↓(wbuf.nbytes + n2, m0), n2 = n3, ¬ rofs, wbuf = mkwbuf(buf1, m1, m2), m4 < # avol, ebm-vol-inv(avol), wbuf-cons(mkwbuf(buf1, m1, m2), mapped(buf2), rofs), n1 ≥ wbuf.nbytes, wbuf.nbytes + n2 ≥ m0, ¬ rofs → m1 + m2 + n3 ≤ LEB_SIZE ∧ n3 ≤ # buf3 ⊦ ⟪buf := copy(wbuf.content, 0, buf, 0, wbuf.nbytes); buf := copy(buf0, 0, buf, wbuf.nbytes, n0); apersistence_io_write#(bleb.leb, wbuf.offset, 0, n1, buf, adr, m, plog, lpt, ns; avol; err); if err = ESUCCESS then {wbuf.content := copy(buf0, n0, wbuf.content, 0, n); wbuf.offset := wbuf.offset + n1; wbuf.nbytes := n} else rofs := true⟫ (# wbuf.content = EB_PAGE_SIZE ∧ m4 < # avol ∧ wbuf-cons(wbuf, avol[m4], rofs) ∧ ebm-vol-inv(avol) ∧ # lpt = # avol), m0 = 0