| asynced1 ↔ asynced2, files0[m] = mkfile(m0, md0, # links(m, dirs), content), files = files0, ino = inode.ino, inode = mkinode(m, md, false, # links(m, dirs), 0, m2), n = 0, pcache0 = pcache, afs-cons(dirs, files0), pcache-cons(pcache, dirs, files0), m ∈ files0 ⊦ [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 → files[m].content:= (files[m].content upto m2) = mkfile(m0, md0, # links(m, dirs), (content ⊕ mkcontent(m, pcache0)) upto m2)) |
asynced1 ↔ asynced2, files0[m] = mkfile(m0, md0, # links(m, dirs), content), err = ESUCCESS, files = files0, ino = inode.ino, inode = mkinode(m, md, false, # links(m, dirs), 0, m2), n = 0, pcache0 = pcache, afs-cons(dirs, files0), pcache-cons(pcache, dirs, files0), m ∈ files0 ⊦ [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 → files[m].content:= (files[m].content upto m2) = mkfile(m0, md0, # links(m, dirs), (content ⊕ mkcontent(m, pcache0)) upto m2))