Patent ID: 8660988

Claim:
A computer-implemented method comprising: establishing a plurality of queues, wherein each queue is for a corresponding one of a plurality of blocks of a disk; while allowing non-blocking updates to the plurality of blocks by a plurality of concurrently running clients, attaining a consistency level relative to updates to the plurality of blocks by having each of the plurality of concurrently running clients initiate updates by storing, for each update to each given block of the plurality of blocks, a log record in the queue that corresponds to the given block, without updating the given block directly; wherein updates reflected in each given queue of the plurality of queues are applied to the corresponding block only after one of the plurality of concurrently running clients has obtaining a flushing lock on the given queue; wherein the plurality of concurrently running clients includes a first client and a second client; wherein the step of allowing non-blocking updates includes: without obtaining any lock on a block of the plurality of blocks, the first client writing a first log record to a queue associated with the block, wherein the first log record comprises first update information for a first pending update to the block on the disk; without obtaining any lock on the block, the second client writing a second log record to the queue, wherein the second log record comprises second update information for a second pending update to the block on the disk; and the first client flushing the queue, wherein flushing the queue comprises: obtaining a flushing lock on the queue, wherein obtaining the flushing lock grants the first client exclusive rights to apply updates, reflected in the queue, to a copy of the block; after obtaining the flushing lock, the first client applying a first update indicated in the first update information to the copy of the block; applying a second update indicated in the second update information to the copy of the block; writing the copy to the block on the disk; and releasing the flushing lock on the queue to enable another client, of the plurality of concurrently running clients, to subsequently obtain the flushing lock on the queue.