BACKGROUND

Some file systems use transactions to provide atomicity, consistency, isolation, and durability (ACID) properties for file operations, and in some use cases, concurrent read/write transactions on the same file may be frequent. Previously, concurrency has been achieved by using a byte-level range lock, which allows read/write operations that do not have overlapping ranges to be executed concurrently. However, access to the file data may result in changes to the file's metadata. For example, multiple processes reading disjointed sections of the file data could result in concurrent attempts to update the metadata, specifically access time (atime).

Unfortunately, metadata changes cannot be isolated using a range lock, resulting in a race condition. Additionally, updating metadata prior to a transaction commit introduces potential inaccuracy for other processes. If a first process changes the file metadata, for example change time (ctime) and file size, prior to committing a write transaction, a second process reads the changed metadata, and then the first process fails prior to the transaction commit, then the second process will be operating on corrupted (e.g., untruthful) data.

SUMMARY

This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.

An exemplary system for isolating concurrent read and write transactions on a file comprises: a processor; a computer-readable medium storing instructions that are operative when executed by the processor to: obtain an upgrade lock of file stat data for the file; copy at least a portion of the file stat into a private storage; for each mergeable transaction in a transaction group, merge an update of the current mergeable transaction into the file stat portion in the private storage; atomically store the file stat portion of the private storage into the file stat data for the file; and release the upgrade lock of the file stat data for the file.

