[Imprint][Data Privacy Statement][E-Mail]

View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Theorem truncate

aubifs_truncate#(N, PAGENO, FI, RO, FO; PBUF-OPT, INODE, MODIFIED, ERR, RI, FS, LOG, CSYNCED) {if pre-truncate(INODE, N, PAGENO, PBUF-OPT, FS, RI, RO) then choose ADR1, ADR2, ADR3, EXISTS with true in let KEY1 = inodekey(INODE.ino), KEY2 = inodekey(INODE.ino), OFFSET = INODE.size % VFS_PAGE_SIZE, SIZE = min(N, INODE.size) in let KEY3 = datakey(INODE.ino, PAGENO), ND1 = truncnode(KEY1, SIZE), ND2 = inodenode(KEY2, INODE.meta, INODE.directory, INODE.nlink, INODE.nsubdirs, N), ND3 = ? in {if INODE.size ≤ N ∧ OFFSET ≠ 0 then if PBUF-OPT.some? then {ND3 := datanode(KEY3, PBUF-OPT.buf); EXISTS := true, ERR := ESUCCESS} else aubifs_core_index_lookup#(KEY3, RI, FI, RO, FO, FS, LOG, CSYNCED; EXISTS, ND3; ERR) else EXISTS := false, ERR := ESUCCESS; if ERR = ESUCCESS then if EXISTS then {ND3.data := fill(ND3.data, zero, OFFSET, VFS_PAGE_SIZE - OFFSET); aubifs_core_journal_add3#(ND1, ND2, ND3, RI, FI, RO, FO; ADR1, ADR2, ADR3, FS, LOG; CSYNCED, ERR); if ERR = ESUCCESS then aubifs_core_index_store#(KEY3, ADR3, FI, RO, FO, FS, LOG, CSYNCED; RI)} else aubifs_core_journal_add2#(ND1, ND2, RI, FI, RO, FO; ADR1, ADR2, FS, LOG; CSYNCED, ERR); if ERR = ESUCCESS then {aubifs_core_index_store#(KEY2, ADR2, FI, RO, FO, FS, LOG, CSYNCED; RI); aubifs_core_index_truncate#(KEY1, SIZE, FI, RO, FO, FS, LOG, CSYNCED; RI); MODIFIED := EXISTS; INODE := mkinode(INODE.ino, ND2.meta, ND2.directory, ND2.nlink, ND2.nsubdirs, ND2.size); if MODIFIED then PBUF-OPT := some(ND3.data)}} else abort }