diff options
author | Yan <yanzheng@21cn.com> | 2008-01-14 13:26:08 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:59 -0400 |
commit | fdebe2bd70047e057827cba85ba31b2545e31900 (patch) | |
tree | 7daee1b3fc0060d4ae84925a6f8358b4ff95d7b4 /fs/btrfs/ctree.h | |
parent | 744f52f997b21de2a01931f79cf6c198bf688120 (diff) | |
download | lwn-fdebe2bd70047e057827cba85ba31b2545e31900.tar.gz lwn-fdebe2bd70047e057827cba85ba31b2545e31900.zip |
Btrfs: Add readonly inode flag
This patch adds readonly inode flag support. A file with this flag
can't be modified, but can be deleted.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 0c0edacbc14c..245952cf7650 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -451,9 +451,9 @@ struct btrfs_root { /* * Inode flags */ -#define BTRFS_INODE_NODATASUM 0x1 -#define BTRFS_INODE_NODATACOW 0x2 - +#define BTRFS_INODE_NODATASUM (1 << 0) +#define BTRFS_INODE_NODATACOW (1 << 1) +#define BTRFS_INODE_READONLY (1 << 2) #define btrfs_clear_flag(inode, flag) (BTRFS_I(inode)->flags &= \ ~BTRFS_INODE_##flag) #define btrfs_set_flag(inode, flag) (BTRFS_I(inode)->flags |= \ |