diff options
author | Jan Kara <jack@suse.cz> | 2014-11-25 11:41:49 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-11-25 11:41:49 -0500 |
commit | cbd7584e6ead1b79fb0b81573f158b57fa1f0b49 (patch) | |
tree | 55594320c91d408ab9aa63f8fc1ef79b3556cd14 /include/trace | |
parent | 0756b908a364c217bc2d8063783992ffe338b143 (diff) |
ext4: fix block reservation for bigalloc filesystems
For bigalloc filesystems we have to check whether newly requested inode
block isn't already part of a cluster for which we already have delayed
allocation reservation. This check happens in ext4_ext_map_blocks() and
that function sets EXT4_MAP_FROM_CLUSTER if that's the case. However if
ext4_da_map_blocks() finds in extent cache information about the block,
we don't call into ext4_ext_map_blocks() and thus we always end up
getting new reservation even if the space for cluster is already
reserved. This results in overreservation and premature ENOSPC reports.
Fix the problem by checking for existing cluster reservation already in
ext4_da_map_blocks(). That simplifies the logic and actually allows us
to get rid of the EXT4_MAP_FROM_CLUSTER flag completely.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index ff4bd1b35246..bb7dcbe99652 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -50,8 +50,7 @@ struct extent_status; | |||
50 | { EXT4_MAP_NEW, "N" }, \ | 50 | { EXT4_MAP_NEW, "N" }, \ |
51 | { EXT4_MAP_MAPPED, "M" }, \ | 51 | { EXT4_MAP_MAPPED, "M" }, \ |
52 | { EXT4_MAP_UNWRITTEN, "U" }, \ | 52 | { EXT4_MAP_UNWRITTEN, "U" }, \ |
53 | { EXT4_MAP_BOUNDARY, "B" }, \ | 53 | { EXT4_MAP_BOUNDARY, "B" }) |
54 | { EXT4_MAP_FROM_CLUSTER, "C" }) | ||
55 | 54 | ||
56 | #define show_free_flags(flags) __print_flags(flags, "|", \ | 55 | #define show_free_flags(flags) __print_flags(flags, "|", \ |
57 | { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \ | 56 | { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \ |