On Tue, Nov 06, 2018 at 02:41:10PM +0800, Lu Fengqi wrote: > From: Wang Xiaoguang <wangxg.f...@cn.fujitsu.com> > > Introduce the header for btrfs in-band(write time) de-duplication > framework and needed header. > > The new de-duplication framework is going to support 2 different dedupe > methods and 1 dedupe hash. > > Signed-off-by: Qu Wenruo <quwen...@cn.fujitsu.com> > Signed-off-by: Wang Xiaoguang <wangxg.f...@cn.fujitsu.com> > Signed-off-by: Lu Fengqi <lufq.f...@cn.fujitsu.com> > --- > fs/btrfs/ctree.h | 7 ++ > fs/btrfs/dedupe.h | 128 ++++++++++++++++++++++++++++++++++++- > fs/btrfs/disk-io.c | 1 + > include/uapi/linux/btrfs.h | 34 ++++++++++ > 4 files changed, 168 insertions(+), 2 deletions(-) > > diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h > index 80953528572d..910050d904ef 100644 > --- a/fs/btrfs/ctree.h > +++ b/fs/btrfs/ctree.h > @@ -1118,6 +1118,13 @@ struct btrfs_fs_info { > spinlock_t ref_verify_lock; > struct rb_root block_tree; > #endif > + > + /* > + * Inband de-duplication related structures > + */ > + unsigned long dedupe_enabled:1;
Please use a BTRFS_FS_ flag for this. Thanks, Josef