diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-09-29 04:35:16 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-22 03:41:07 +0200 |
commit | b9d0b38928e21560550bd3c1a278d6e004d3bde6 (patch) | |
tree | 77fbb0603be74eb80066bee2c941c7904487b812 /include/trace/events | |
parent | btrfs: qgroup: Add handler for NOCOW and inline (diff) | |
download | linux-b9d0b38928e21560550bd3c1a278d6e004d3bde6.tar.xz linux-b9d0b38928e21560550bd3c1a278d6e004d3bde6.zip |
btrfs: Add handler for invalidate page
For btrfs_invalidatepage() and its variant evict_inode_truncate_page(),
there will be pages don't reach disk.
In that case, their reserved space won't be release nor freed by
finish_ordered_io() nor delayed_ref handler.
So we must free their qgroup reserved space, or we will leaking reserved
space again.
So this will patch will call btrfs_qgroup_free_data() for
invalidatepage() and its variant evict_inode_truncate_page().
And due to the nature of new btrfs_qgroup_reserve/free_data() reserved
space will only be reserved or freed once, so for pages which are
already flushed to disk, their reserved space will be released and freed
by delayed_ref handler.
Double free won't be a problem.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'include/trace/events')
0 files changed, 0 insertions, 0 deletions