| btree_io_save#(R, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS; ADR, ZH, ISTORE, PSTATE, PSYNCED; ERR) {let IND = save(ZH[R]), SIZE = 0 in {apersistence_get_block_free_size#(ROOTADR, ISTORE, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; ; SIZE); if SIZE < IND.flashsize then {apersistence_sync#(ROOTADR, ISTORE, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS; PSTATE, PSYNCED; ERR); if ERR = ESUCCESS then apersistence_allocate_ind#(ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSYNCED; ISTORE, PSTATE; ERR)} else ERR := ESUCCESS; if ERR = ESUCCESS then {apersistence_add_ind#(IND, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS; ADR, ISTORE, PSTATE, PSYNCED; ERR); if ERR = ESUCCESS then let SIZE = 0 in {apersistence_get_iblock_refsize# (ADR.lnum, ROOTADR, ISTORE, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; ; SIZE); apersistence_set_iblock_refsize# (ADR.lnum, SIZE + ADR.size, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED; ISTORE)}}}; if ERR = ESUCCESS then ZH[R].dirty := false } |