diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2014-04-23 19:33:33 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-04-24 16:43:32 -0700 |
commit | 9d89ce658718d9d21465666127a15ca2c82c4ea7 (patch) | |
tree | 31a53b58e98f8c63a9f1e7bba0c673b35cf1d743 /fs/btrfs/ctree.h | |
parent | 3f9e3df8da3c51649c15db249978a10f7374236a (diff) | |
download | blackbird-op-linux-9d89ce658718d9d21465666127a15ca2c82c4ea7.tar.gz blackbird-op-linux-9d89ce658718d9d21465666127a15ca2c82c4ea7.zip |
Btrfs: move btrfs_{set,clear}_and_info() to ctree.h
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index ad1a5943a923..e7c9e1c540f4 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2058,6 +2058,20 @@ struct btrfs_ioctl_defrag_range_args { #define btrfs_raw_test_opt(o, opt) ((o) & BTRFS_MOUNT_##opt) #define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \ BTRFS_MOUNT_##opt) +#define btrfs_set_and_info(root, opt, fmt, args...) \ +{ \ + if (!btrfs_test_opt(root, opt)) \ + btrfs_info(root->fs_info, fmt, ##args); \ + btrfs_set_opt(root->fs_info->mount_opt, opt); \ +} + +#define btrfs_clear_and_info(root, opt, fmt, args...) \ +{ \ + if (btrfs_test_opt(root, opt)) \ + btrfs_info(root->fs_info, fmt, ##args); \ + btrfs_clear_opt(root->fs_info->mount_opt, opt); \ +} + /* * Inode flags */ |