diff options
author | Yan <yanzheng@21cn.com> | 2008-01-08 15:54:37 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | b98b6767a0f6f9baa1d00eff64a43d58412ecdeb (patch) | |
tree | b1c5346f462be12b268ff05049651bb3b880c7c9 /fs/btrfs/ctree.h | |
parent | c31f8830f0dfd31e7e196b85ca1b39aef8b77d57 (diff) |
Btrfs: Add inode flags support
This patch adds NODATASUM & NODATACOW inode flags support.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index f0fb1978553c..7eda51542d17 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -447,7 +447,18 @@ struct btrfs_root { | |||
447 | #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) | 447 | #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) |
448 | #define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \ | 448 | #define btrfs_test_opt(root, opt) ((root)->fs_info->mount_opt & \ |
449 | BTRFS_MOUNT_##opt) | 449 | BTRFS_MOUNT_##opt) |
450 | 450 | /* | |
451 | * Inode flags | ||
452 | */ | ||
453 | #define BTRFS_INODE_NODATASUM 0x1 | ||
454 | #define BTRFS_INODE_NODATACOW 0x2 | ||
455 | |||
456 | #define btrfs_clear_flag(inode, flag) (BTRFS_I(inode)->flags &= \ | ||
457 | ~BTRFS_INODE_##flag) | ||
458 | #define btrfs_set_flag(inode, flag) (BTRFS_I(inode)->flags |= \ | ||
459 | BTRFS_INODE_##flag) | ||
460 | #define btrfs_test_flag(inode, flag) (BTRFS_I(inode)->flags & \ | ||
461 | BTRFS_INODE_##flag) | ||
451 | /* some macros to generate set/get funcs for the struct fields. This | 462 | /* some macros to generate set/get funcs for the struct fields. This |
452 | * assumes there is a lefoo_to_cpu for every type, so lets make a simple | 463 | * assumes there is a lefoo_to_cpu for every type, so lets make a simple |
453 | * one for u8: | 464 | * one for u8: |