diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-06-05 18:34:02 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-06-11 18:30:49 -0700 |
commit | 3c45414527487549f469484337a4c5ae5d84dc80 (patch) | |
tree | c8807e099ed9943256e4d53afbd00b41ecd7d2b6 /fs/f2fs/namei.c | |
parent | 43f54cd52f6eea2017505d2a3ac82d372c33749b (diff) | |
download | op-kernel-dev-3c45414527487549f469484337a4c5ae5d84dc80.zip op-kernel-dev-3c45414527487549f469484337a4c5ae5d84dc80.tar.gz |
f2fs: do not trim preallocated blocks when truncating after i_size
When we perform generic/092 in xfstests, output is like below:
XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
0: [0..10239]: data
0: [0..10239]: data
-1: [10240..20479]: unwritten
+1: [10240..14335]: unwritten
This is because with this testcase, we redefine the regulation for
truncate in perallocated space past i_size as below:
"There was some confused about what the fs was supposed to do when you
truncate at i_size with preallocated space past i_size. We decided on the
following things.
1) truncate(i_size) will trim all blocks past i_size.
2) truncate(x) where x > i_size will not trim all blocks past i_size.
"
This method is used in xfs, and then ext4/btrfs will follow the rule.
This patch fixes to follow the new rule for f2fs.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
0 files changed, 0 insertions, 0 deletions