| # buf = VFS_PAGE_SIZE, pcache[datakey(m, m2 / VFS_PAGE_SIZE)] = mkpentry(boolvar, buf), files[m] = mkfile(m1, md1, # links(m, dirs), content0), 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) ⊦ [fail#(; ; err); asynced := ?] ⟪asynced4 := asynced0; if err = ESUCCESS then let asynced = false in {icache_set#(mkinode(m, md, false, # links(m, dirs), 0, m2), asynced; err, icache); pcache_truncate#(m, m2, n; err, pcache); if asynced4 then pcache_set#(m, m2 / VFS_PAGE_SIZE, some(buf).buf, asynced; err, pcache)}; if ¬ asynced4 ∨ err ≠ ESUCCESS then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))) |
# buf = VFS_PAGE_SIZE, files[m] = mkfile(m1, md1, # links(m, dirs), content0), pcache[datakey(m, m2 / VFS_PAGE_SIZE)] = mkpentry(boolvar, buf), 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) ⊦ [choose err0 with ⌊err0⌋ in err := err0; asynced := ?] ⟪asynced4 := asynced0; if err = ESUCCESS then let asynced = false in {icache_set#(mkinode(m, md, false, # links(m, dirs), 0, m2), asynced; err, icache); pcache_truncate#(m, m2, n; err, pcache); if asynced4 then pcache_set#(m, m2 / VFS_PAGE_SIZE, some(buf).buf, asynced; err, pcache)}; if ¬ asynced4 ∨ err ≠ ESUCCESS then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache)))
Used simplifier rules: fail#(; ; ERR){choose ERR0 with ⌊ERR0⌋ in ERR := ERR0};