| asynced1 ↔ asynced, err = ESUCCESS ∨ ⌊err⌋ ⊦ [err := ESUCCESS; let n = 0, ino = inode.ino, asynced0 = ?, asynced = ? in while n * VFS_PAGE_SIZE < inode.size ∧ err = ESUCCESS do {/* (fsync-pages-overwrite : invariant afs-cons(dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ getinode(ino, dirs, files) = getinode(ino, dirs, files`) ∧ ino = inode.ino ∧ ino ∈ files ∧ (∀ key. (key ∈ pcache ↔ key ∈ pcache`) ∧ pcache[key].page = (pcache`)[key].page ∧ (pcache[key].dirty → (pcache`)[key].dirty)) ∧ ( err = ESUCCESS → (∀ pageno. (pageno < n ⊃ (pageno ∈ files[ino].content ↔ pageno ∈ (files` ⊕ pcache`)[ino].content) ∧ files[ino].content[pageno] = (files` ⊕ pcache`)[ino].content[pageno] ; (pageno ∈ files[ino].content ↔ pageno ∈ (files`)[ino].content) ∧ files[ino].content[pageno] = (files`)[ino].content[pageno] )))) */; pcache_check_page#(ino, n, pcache; asynced0, asynced, err); if asynced0 ∧ asynced then let buf = ? in {pcache_get#(ino, n, pcache; asynced0, buf, err); if err = ESUCCESS then afs_writepage#(inode, n, buf, dirs; err, files; asynced1); if err = ESUCCESS then afs_check_commit#(dirs, files; err; asynced1); if err = ESUCCESS then {asynced := false; pcache_set_status#(ino, n, asynced; err, pcache)}}; n := n + 1}] (err = ESUCCESS ∨ ⌊err⌋ ) |
asynced1 ↔ asynced, err = ESUCCESS ∨ ⌊err⌋ ⊦ [let n = 0, ino = inode.ino, asynced0 = ?, asynced = ? in {err := ESUCCESS; while n * VFS_PAGE_SIZE < inode.size ∧ err = ESUCCESS do {/* (fsync-pages-overwrite : invariant afs-cons(dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ getinode(ino, dirs, files) = getinode(ino, dirs, files`) ∧ ino = inode.ino ∧ ino ∈ files ∧ (∀ key. (key ∈ pcache ↔ key ∈ pcache`) ∧ pcache[key].page = (pcache`)[key].page ∧ (pcache[key].dirty → (pcache`)[key].dirty)) ∧ ( err = ESUCCESS → (∀ pageno. (pageno < n ⊃ (pageno ∈ files[ino].content ↔ pageno ∈ (files` ⊕ pcache`)[ino].content) ∧ files[ino].content[pageno] = (files` ⊕ pcache`)[ino].content[pageno] ; (pageno ∈ files[ino].content ↔ pageno ∈ (files`)[ino].content) ∧ files[ino].content[pageno] = (files`)[ino].content[pageno] )))) */; pcache_check_page#(ino, n, pcache; asynced0, asynced, err); if asynced0 ∧ asynced then let buf = ? in {pcache_get#(ino, n, pcache; asynced0, buf, err); if err = ESUCCESS then afs_writepage#(inode, n, buf, dirs; err, files; asynced1); if err = ESUCCESS then afs_check_commit#(dirs, files; err; asynced1); if err = ESUCCESS then {asynced := false; pcache_set_status#(ino, n, asynced; err, pcache)}}; n := n + 1}}] (err = ESUCCESS ∨ ⌊err⌋ )