| # links(m, dirs) = m3, files[m] = mkfile(m1, md1, m3, content0), files[m] = mkfile(m0, md0, m3, content), buf-opt = none, err = ESUCCESS, inode = mkinode(m, md, false, m3, 0, m2), 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, asynced2 → synced(files, icache, pcache) ⊦ [afs_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt, inode, asynced4, err, dirs, files, asynced3)] ( afs-cons(dirs, files) → ⟪if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, m2, n; err, pcache); if asynced4 then pcache_set#(inode.ino, m2 / VFS_PAGE_SIZE, 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) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache)))), datakey(m, m2 / VFS_PAGE_SIZE) ∈ pcache |
files[m] = mkfile(m0, md0, # links(m, dirs), content), buf-opt = none, err = ESUCCESS, inode = mkinode(m, md, false, # links(m, dirs), 0, m2), 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) ⊦ [afs_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt, inode, asynced4, err, dirs, files, asynced3)] ( afs-cons(dirs, files) → ⟪if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, m2, n; err, pcache); if asynced4 then pcache_set#(inode.ino, m2 / VFS_PAGE_SIZE, 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) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))))
Used simplifier rules: ⊦ mkfile(m, md, m0, content) = mkfile(m1, md0, m2, content0) ↔ m = m1 ∧ md = md0 ∧ m0 = m2 ∧ content = content0; (ws)