diff options
author | Younger Liu <[email protected]> | 2014-02-10 14:25:51 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-02-10 16:01:43 -0800 |
commit | d62e74be1270c89fbaf7aada8218bfdf62d00a58 (patch) | |
tree | 2dde7ffc245d44cf51f699b3c5587df8f50882f2 /tools/perf/util/trace-event-scripting.c | |
parent | 8d547ff4ac5927245e0833ac18528f939da0ee0e (diff) |
ocfs2: fix issue that ocfs2_setattr() does not deal with new_i_size==i_size
The issue scenario is as following:
- Create a small file and fallocate a large disk space for a file with
FALLOC_FL_KEEP_SIZE option.
- ftruncate the file back to the original size again. but the disk free
space is not changed back. This is a real bug that be fixed in this
patch.
In order to solve the issue above, we modified ocfs2_setattr(), if
attr->ia_size != i_size_read(inode), It calls ocfs2_truncate_file(), and
truncate disk space to attr->ia_size.
Signed-off-by: Younger Liu <[email protected]>
Reviewed-by: Jie Liu <[email protected]>
Tested-by: Jie Liu <[email protected]>
Cc: Joel Becker <[email protected]>
Reviewed-by: Mark Fasheh <[email protected]>
Cc: Sunil Mushran <[email protected]>
Reviewed-by: Jensen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions