summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorYan <yanzheng@21cn.com>2008-01-14 13:35:00 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-01-14 13:35:00 -0500
commit3a3123bfc1074ee81c8cb44938e4b50a044898b9 (patch)
tree73d8a92132b280a7a1583a9a8915ba095064706f /ctree.h
parent62a72e7d9ada7a986dd299622b2233fe2e386003 (diff)
Add readonly inode flag
This patch adds readonly inode flag support. A file with this flag can't be modified, but can be deleted.
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ctree.h b/ctree.h
index 444f47ed..d619f30e 100644
--- a/ctree.h
+++ b/ctree.h
@@ -418,8 +418,10 @@ 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 read_eb_member(eb, ptr, type, member, result) ( \
read_extent_buffer(eb, (char *)(result), \
((unsigned long)(ptr)) + \