| VFS_PAGE_SIZE = n3 + (n0 + n2) % VFS_PAGE_SIZE, min(n1 - n0 + n2, n3) ≠ 0, write-inv(n0, n1, inode, buf, n2, dirs, files0, files1), n0 + n2 ≤ n1 ⊦ [vfs_writepage#(inode, (n0 + n2) / VFS_PAGE_SIZE, buf, n2, (n0 + n2) % VFS_PAGE_SIZE, min(n1 - n0 + n2, n3), dirs; err, files1, asynced); n := min(n1 - n0 + n2, n3); if err = ESUCCESS then n2 := n2 + n] write-inv(n0, n1, inode, buf, n2, dirs, files0, files1) |
VFS_PAGE_SIZE = n3 + (n0 + n2) % VFS_PAGE_SIZE, buf0 = buf, files = files1, ino = (n0 + n2) % VFS_PAGE_SIZE, ino0 = n2, n = min(n1 - n0 + n2, n3), pageno = (n0 + n2) / VFS_PAGE_SIZE, write-inv(n0, n1, inode, buf, n2, dirs, files0, files1), n0 + n2 ≤ n1, n1 ≥ n0 + n2 ⊦ [let buf = mkbuf(VFS_PAGE_SIZE) in {afs_readpage#(inode, pageno, dirs, files, asynced; buf, err); if err = ESUCCESS then afs_check_commit#(dirs, files; err; asynced); if err = ESUCCESS then {buf := copy(buf0, ino0, buf, ino, n); afs_writepage#(inode, pageno, buf, dirs; err, files; asynced)}}; n := min(n1 - n0 + n2, n3); if err = ESUCCESS then n2 := n2 + n] write-inv(n0, n1, inode, buf, n2, dirs, files0, files), VFS_PAGE_SIZE = 0, min(n1 - n0 + n2, n3) = 0
Used simplifier rules: vfs_writepage# (INODE, PAGENO, BUF, TOTAL, OFFSET, N, DIRS; ERR, FILES, ASYNCED) {let PBUF = mkbuf(VFS_PAGE_SIZE) in {afs_readpage#(INODE, PAGENO, DIRS, FILES, ASYNCED; PBUF, ERR); if ERR = ESUCCESS then afs_check_commit#(DIRS, FILES; ERR; ASYNCED); if ERR = ESUCCESS then {PBUF := copy(BUF, TOTAL, PBUF, OFFSET, N); afs_writepage# (INODE, PAGENO, PBUF, DIRS; ERR, FILES; ASYNCED)}} };