diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-10-12 06:08:16 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-22 03:37:43 +0200 |
commit | ac46777213e00e26b9210060586f473368c54da2 (patch) | |
tree | e4e2b6758fb57e53fc0cec268dd133955ee7e615 /fs/btrfs/extent_io.h | |
parent | Merge branch 'integration-4.4' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-ac46777213e00e26b9210060586f473368c54da2.tar.xz linux-ac46777213e00e26b9210060586f473368c54da2.zip |
btrfs: extent_io: Introduce needed structure for recoding set/clear bits
Add a new structure, extent_change_set, to record how many bytes are
changed in one set/clear_extent_bits() operation, with detailed changed
ranges info.
This provides the needed facilities for later qgroup reserve framework.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/extent_io.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index c668f36898d3..3107a6eb8e78 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -2,6 +2,7 @@ #define __EXTENTIO__ #include <linux/rbtree.h> +#include "ulist.h" /* bits for the extent state */ #define EXTENT_DIRTY (1U << 0) @@ -161,6 +162,17 @@ struct extent_buffer { #endif }; +/* + * Structure to record how many bytes and which ranges are set/cleared + */ +struct extent_changeset { + /* How many bytes are set/cleared in this operation */ + u64 bytes_changed; + + /* Changed ranges */ + struct ulist *range_changed; +}; + static inline void extent_set_compress_type(unsigned long *bio_flags, int compress_type) { |