CPC G06F 16/1865 (2019.01) [G06F 16/162 (2019.01); G06F 16/1727 (2019.01)] | 15 Claims |
1. A method of performing a file transaction, the method comprising:
providing a transaction instruction to perform a set of one or more transaction operations on a device;
responsive to determining the transaction instruction comprises one or more write transaction operations, wherein the one or more write transaction operations collectively relate to a first file group comprising at least one file object, the first file group has a first size, and each of the at least one file objects comprises identification information, if the first size does not exceed available device storage:
writing each of the at least one file objects with an uncommitted file type, wherein writing a file object with an uncommitted file type comprises:
storing a length of the file object in a first location;
updating an entry type of a block of freespace to indicate an uncommitted file entry length;
updating a header of the block of freespace with the length of the file object;
updating the entry type of the block of freespace to indicate an uncommitted file type; and
writing data from the file object to the freespace block;
after the first file group is written, storing transaction information on the device storage indicating that the transaction is committed;
responsive to determining that one or more pre-existing file objects share identification information with any of the first file group, erasing the one or more pre-existing file objects; and
after erasing the one or more pre-existing objects, updating the type of each of the at least one file objects in the first file group to a finalised type.
|