| # buf = VFS_PAGE_SIZE, files[m] = mkfile(m0, md, # links(m, dirs), content), err = ESUCCESS, content[pageno] ≠ zeropage, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), synced(dirs, icache, pcache), m ∈ files, pageno ∈ content, ¬ datakey(m, pageno) ∈ pcache, asynced2 → synced(files, icache, pcache) ⊦ ⟪pcache_set#(m, pageno, content[pageno], false; err, pcache)⟫ (pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))) |
# buf0 = VFS_PAGE_SIZE, asynced ↔ false, files[m] = mkfile(m0, md, # links(m, dirs), content), buf = content[pageno], err = ESUCCESS, ino = m, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), synced(dirs, icache, pcache), pageno ∈ content, m ∈ files, asynced2 → synced(files, icache, pcache) ⊦ ⟪let key = datakey(ino, pageno), pe = mkpentry(asynced, buf) in pcache[key] := pe⟫ (pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))), content[pageno] = zeropage, datakey(m, pageno) ∈ pcache
Used simplifier rules: pcache_set#(INO, PAGENO, BUF, DIRTY; ERR, PCACHE) {let KEY = datakey(INO, PAGENO), PE = mkpentry(DIRTY, BUF) in PCACHE[KEY] := PE };