ovl: Return -ENOMEM if an allocation fails ovl_lookup()
[linux-2.6-microblaze.git] / fs / btrfs / btrfs_inode.h
index d87ac27..eccadb5 100644 (file)
@@ -179,9 +179,14 @@ struct btrfs_inode {
        unsigned reserved_extents;
 
        /*
-        * always compress this one file
+        * Cached values of inode properties
         */
-       unsigned force_compress;
+       unsigned prop_compress;         /* per-file compression algorithm */
+       /*
+        * Force compression on the file using the defrag ioctl, could be
+        * different from prop_compress and takes precedence if set
+        */
+       unsigned defrag_compress;
 
        struct btrfs_delayed_node *delayed_node;
 
@@ -207,7 +212,7 @@ struct btrfs_inode {
 
 extern unsigned char btrfs_filetype_table[];
 
-static inline struct btrfs_inode *BTRFS_I(struct inode *inode)
+static inline struct btrfs_inode *BTRFS_I(const struct inode *inode)
 {
        return container_of(inode, struct btrfs_inode, vfs_inode);
 }
@@ -231,7 +236,7 @@ static inline void btrfs_insert_inode_hash(struct inode *inode)
        __insert_inode_hash(inode, h);
 }
 
-static inline u64 btrfs_ino(struct btrfs_inode *inode)
+static inline u64 btrfs_ino(const struct btrfs_inode *inode)
 {
        u64 ino = inode->location.objectid;