Btrfs: Update on disk i_size only after pending ordered extents are done
[deliverable/linux.git] / fs / btrfs / btrfs_inode.h
index 8d03687510e09d56a66f9a7f5c902f9f0263034c..81c0444f37b64ef4ff5af98657550fe5ad0219cd 100644 (file)
@@ -40,11 +40,20 @@ struct btrfs_inode {
         */
        u64 last_trans;
        u64 delalloc_bytes;
+       u64 disk_i_size;
        u32 flags;
 };
+
 static inline struct btrfs_inode *BTRFS_I(struct inode *inode)
 {
        return container_of(inode, struct btrfs_inode, vfs_inode);
 }
 
+static inline void btrfs_i_size_write(struct inode *inode, u64 size)
+{
+       inode->i_size = size;
+       BTRFS_I(inode)->disk_i_size = size;
+}
+
+
 #endif
This page took 0.026402 seconds and 5 git commands to generate.