-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delay storage operations for an extent that is transitioning from uni…
…nited to initialized state When a file extent that is marked as uninited is written to, all sectors corresponding to the extent are written, including both the data from the write request and any zeroed area(s) surrounding it. This presents a problem when subsequent storage requests are issued on behalf of the extent. Such requests may be made without first waiting for completion of the initializing write. This property of the pagecache - that requests are issued without first waiting for completions for prior requests - is typically not an issue, for read data is cached and not re-read after a write, and writes are posted from the same pagecache buffer, making the order of write completions irrelevant. But the areas of an extent outside of the initial write request, which are written with zeros, could be subsequently read into the cache (or pages overwritten as a whole) prior to the zero writes completing. This has been found to lead to spurious inconsistent data being read - namely, areas that should be zero are read and found to contain nonzero data. To ameliorate this condition, the uninited flag has been changed into an optional record that becomes allocated when a write is first posted to an uninited extent. When subsequent storage requests are made to the extent before the initializing writes complete, they are added to a queue within the uninited record. On completion of the initializing writes, the queued requests are then dispatched, and the uninited state is set to 'initialized', indicating that further operations on the extent should occur normally, as if uninited was not set. (Given that extent references are not tracked and that the extents themselves may be deallocated at any time, the uninited completion never refers to the extent itself, and the record exists for the lifetime of the extent - thus the uninited 'initialized' state having the same semantics as a null uninited field.)
- Loading branch information
Showing
2 changed files
with
181 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters