| asynced1 ↔ false, asynced0 ↔ asynced6, asynced ↔ asynced5, files[m] = mkfile(m1, md1, # links(m, dirs), content0), ¬ asynced5, ¬ asynced6, err = ESUCCESS, ino = m, key = datakey(ino, pageno0), pageno = m2 / VFS_PAGE_SIZE, pageno0 = m2 / VFS_PAGE_SIZE, 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, datakey(m, m2 / VFS_PAGE_SIZE) ∈ pcache, asynced2 → synced(files, icache, pcache) ⊦ ⟪skip; buf-opt := none; if err = ESUCCESS ∧ asynced1 then buf-opt := some(buf); size := m2; inode := mkinode(m, md, false, # links(m, dirs), 0, m2); if err = ESUCCESS then afs_truncate#(n, pageno; buf-opt, inode, asynced4, err, dirs, files, asynced3); if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, size, n; err, pcache); if asynced4 then pcache_set#(inode.ino, pageno, buf-opt.buf, asynced; err, pcache)}; if ¬ asynced4 ∨ err ≠ ESUCCESS then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ dcache-cons(dcache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ afs-cons(dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))), VFS_PAGE_SIZE = 0, key ∈ pcache |
asynced ↔ asynced5, asynced0 ↔ asynced6, asynced1 ↔ false, files[m] = mkfile(m1, md1, # links(m, dirs), content0), ¬ asynced5, ¬ asynced6, err = ESUCCESS, ino = m, key = datakey(ino, pageno0), pageno = m2 / VFS_PAGE_SIZE, pageno0 = m2 / VFS_PAGE_SIZE, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), synced(dirs, icache, pcache), datakey(m, m2 / VFS_PAGE_SIZE) ∈ pcache, m ∈ files, asynced2 → synced(files, icache, pcache) ⊦ ⟪buf-opt := none; if err = ESUCCESS ∧ asynced1 then buf-opt := some(buf); size := m2; inode := mkinode(m, md, false, # links(m, dirs), 0, m2); if err = ESUCCESS then afs_truncate#(n, pageno; buf-opt, inode, asynced4, err, dirs, files, asynced3); if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, size, n; err, pcache); if asynced4 then pcache_set#(inode.ino, pageno, buf-opt.buf, asynced; err, pcache)}; if ¬ asynced4 ∨ err ≠ ESUCCESS then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ dcache-cons(dcache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ afs-cons(dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))), VFS_PAGE_SIZE = 0, key ∈ pcache