| VFS_PAGE_SIZE = n1 + (m0 + ino0) % VFS_PAGE_SIZE, files0[m] = mkfile(m1, md, # links(m, dirs), content0), of[fd] = mkfile(m, mode, m0), buf = mkbuf(VFS_PAGE_SIZE), err = ESUCCESS, ino = (m0 + ino0) % VFS_PAGE_SIZE, inode = mkinode(m, md, false, # links(m, dirs), 0, m1), n = min(m0 + n0 - m0 + ino0, n1), pageno = (m0 + ino0) / VFS_PAGE_SIZE, dom of < ino3, afs-cons(dirs, files0), afs-cons(dirs, files), of-cons(of, dirs, files0), of-cons(of, dirs, files), fd ∈ of, m ∈ files0, n0 ≤ # buf0, ino0 ≤ n0, ino0 ≤ # buf0, m0 + n0 ≥ m0 + ino0 ⊦ [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)}; if err = ESUCCESS then ino3 := ino0 + min(m0 + n0 - m0 + ino0, n1)] (of-cons(of, dirs, files) ∧ afs-cons(dirs, files)), VFS_PAGE_SIZE = 0, min(n0 - ino0, n1) = 0, n0 = 0, mode ≠ MODE_W ∧ mode ≠ MODE_RW, m1 % VFS_PAGE_SIZE ≠ 0 ∧ m1 / VFS_PAGE_SIZE ∈ content0 |
VFS_PAGE_SIZE = n1 + (m0 + ino0) % VFS_PAGE_SIZE, of[fd] = mkfile(m, mode, m0), files0[m] = mkfile(m1, md, # links(m, dirs), content0), buf = mkbuf(VFS_PAGE_SIZE), err = ESUCCESS, min(n0 - ino0, n1) ≠ 0, n0 ≠ 0, dom of < ino3, afs-cons(dirs, files), afs-cons(dirs, files0), of-cons(of, dirs, files), of-cons(of, dirs, files0), m ∈ files0, fd ∈ of, ino0 ≤ # buf0, n0 ≤ # buf0, ino0 ≤ n0 ⊦ [afs_readpage#(mkinode(m, md, false, # links(m, dirs), 0, m1), (m0 + ino0) / VFS_PAGE_SIZE, 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, (m0 + ino0) % VFS_PAGE_SIZE, min(m0 + n0 - m0 + ino0, n1)); afs_writepage#(mkinode(m, md, false, # links(m, dirs), 0, m1), (m0 + ino0) / VFS_PAGE_SIZE, buf, dirs; err, files; asynced)}; if err = ESUCCESS then ino3 := ino0 + min(m0 + n0 - m0 + ino0, n1)] (of-cons(of, dirs, files) ∧ afs-cons(dirs, files)), m1 % VFS_PAGE_SIZE ≠ 0 ∧ m1 / VFS_PAGE_SIZE ∈ content0, mode ≠ MODE_W ∧ mode ≠ MODE_RW
Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ VFS_PAGE_SIZE ≠ 0; (s)