Multi-threaded write interface and methods for increasing the single file read and write throughput of a file server
First Claim
1. A method of operating a network file server computer for providing clients with concurrent write access to a file in data storage, the method comprising the network file server computer responding to a concurrent write request from a client by:
- (a) obtaining a lock for the file; and
then(b) preallocating a metadata block for the file; and
then(c) releasing the lock for the file; and
then(d) asynchronously writing to the file; and
then(e) obtaining the lock for the file; and
then(f) committing the metadata block to the file in the data storage; and
then(g) releasing the lock for the file.
10 Assignments
0 Petitions
Accused Products
Abstract
A write interface in a file server provides permission management for concurrent access to data blocks of a file, ensures correct use and update of indirect blocks in a tree of the file, preallocates file blocks when the file is extended, solves access conflicts for concurrent reads and writes to the same block, and permits the use of pipelined processors. For example, a write operation includes obtaining a per file allocation mutex (mutually exclusive lock), preallocating a metadata block, releasing the allocation mutex, issuing an asynchronous write request for writing to the file, waiting for the asynchronous write request to complete, obtaining the allocation mutex, committing the preallocated metadata block, and releasing the allocation mutex. Since no locks are held during the writing of data to the on-disk storage and this data write takes the majority of the time, the method enhances concurrency while maintaining data integrity.
75 Citations
53 Claims
-
1. A method of operating a network file server computer for providing clients with concurrent write access to a file in data storage, the method comprising the network file server computer responding to a concurrent write request from a client by:
-
(a) obtaining a lock for the file; and
then(b) preallocating a metadata block for the file; and
then(c) releasing the lock for the file; and
then(d) asynchronously writing to the file; and
then(e) obtaining the lock for the file; and
then(f) committing the metadata block to the file in the data storage; and
then(g) releasing the lock for the file. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 48, 49, 51, 52)
-
-
25. A method of operating a network file server computer for providing clients with concurrent write access to a file in data storage, the method comprising the network file server computer responding to a concurrent write request from a client by executing a write thread, execution of the write thread including:
-
(a) obtaining an allocation mutex for the file; and
then(b) preallocating new metadata blocks that need to be allocated for writing to the file; and
then(c) releasing the allocation mutex for the file; and
then(d) issuing asynchronous write requests for writing to the file; (e) waiting for callbacks indicating completion of the asynchronous write requests; and
then(f) obtaining the allocation mutex for the file; and
then(g) committing the preallocated metadata blocks to the file in the data storage; and
then(h) releasing the allocation mutex for the file. - View Dependent Claims (50, 53)
-
-
26. A network file server comprising storage for storing a file, and at least one processor coupled to the storage for providing clients with concurrent write access to the file, wherein the network file server is programmed for responding to a concurrent write request from a client by:
-
(a) obtaining a lock for the file; and
then(b) preallocating a metadata block for the file; and
then(c) releasing the lock for the file; and
then(d) asynchronously writing to the file; and
then(e) obtaining the lock for the file; and
then(f) committing the metadata block to the file; and
then(g) releasing the lock for the file. - View Dependent Claims (27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 47)
-
-
44. A network file server comprising storage for storing a file, and at least one processor coupled to the storage for providing clients with concurrent write access to the file, wherein the network file server is programmed with a write thread for responding to a concurrent write request from a client by:
-
(a) obtaining an allocation mutex for the file; and
then(b) preallocating new metadata blocks that need to be allocated for writing to the file; and
then(c) releasing the allocation mutex for the file; and
then(d) issuing asynchronous write requests for writing to the file; (e) waiting for callbacks indicating completion of the asynchronous write requests; and
then(f) obtaining the allocation mutex for the file; and
then(g) committing the preallocated metadata blocks; and
then(h) releasing the allocation mutex for the file. - View Dependent Claims (45, 46)
-
Specification