diff options
| author | Sergei Antonov <[email protected]> | 2015-04-16 12:47:15 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2015-04-17 09:04:05 -0400 |
| commit | 059a704c43ea8800a689cf90fadb48f1e985c7eb (patch) | |
| tree | ccaee84698733bd7a8cdb71ab65bd5e3d76f73de /tools/perf/scripts/python | |
| parent | 27a4e3884e9c6497f96cc28256c3cdaa93d4cf97 (diff) | |
hfsplus: fix expand when not enough available space
Fix a bug which is reproduced as follows. Create a file:
echo abc > test_file
Try to expand the file beyond available space:
truncate --size=<size exceeding available space> test_file
Since HFS+ does not support file size > allocated size, truncate should
fail. However, it ends successfully. The driver returns success despite
having been unable to allocate the requested space for the file. Also
filesystem check finds an error:
Checking catalog file.
Incorrect size for file test_file
(It should be 469094400 instead of 1000000000)
Add a piece of code analogous to code in the fat driver. Now a proper
error is returned and filesystem remains consistent.
Signed-off-by: Sergei Antonov <[email protected]>
Cc: Vyacheslav Dubeyko <[email protected]>
Cc: Hin-Tak Leung <[email protected]>
Reviewed-by: Anton Altaparmakov <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Sougata Santra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions