OpenAFS client does not flush pages for new empty files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openafs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Chris J Arges | ||
Quantal |
Fix Released
|
Medium
|
Chris J Arges |
Bug Description
[ Impact ]
This affects all versions with Linux kernel commit a32ea1e1f925399
This affects precise and quantal versions.
An upstream fix for 1.6.x clients is here:
http://
Essentially this patch ensures we flush pages for empty files.
[ Test Case ]
Consider two OpenAFS clients: client A and client B. Client B is running Linux kernel v2.6.23 or higher, and client A is running on any platform:
1. Client A creates a new file
2. Client B reads the new, empty file
3. Client A writes data to the new file
4. Client B reads the new, now non-empty file again
Client B will now read 4096 of NUL bytes, followed by the actual file data. If an application is copying file data out of AFS, or to another location in AFS, this error will become permanent, since the NUL bytes are stored in a new file.
Note that this issue only occurs for files that have never contained any data. In the above example, if client A had truncated an existing non-empty file to 0 bytes instead of creating a new empty file, the issue would not occur.
The most common occurrence of this issue tends to be when client A is copying a large file into AFS, and client B is trying to read the file as it is being copied. Client A will create the empty file as soon as it starts copying, but the file contents will not be written to the fileserver until later.
[ Regression Potential ]
This is an upstream patch, and this code is present in versions in Raring and beyond.
A test build has been used to verify this fix already.
Changed in openafs (Ubuntu): | |
status: | New → Fix Released |
Changed in openafs (Ubuntu Precise): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in openafs (Ubuntu Quantal): | |
assignee: | nobody → Chris J Arges (arges) |
Changed in openafs (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in openafs (Ubuntu Quantal): | |
importance: | Undecided → Medium |
Changed in openafs (Ubuntu Precise): | |
status: | New → In Progress |
Changed in openafs (Ubuntu Quantal): | |
status: | New → In Progress |
uploaded for P/Q