提交 ac467772 编写于 作者: Q Qu Wenruo 提交者: Chris Mason

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: NQu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 a408365c
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册