aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-12-21 16:27:21 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit1832a6d5ee3b1af61001cadba9e10da9e91af4a4 (patch)
tree3a6dcb2a186c3623b0355b7e45d1b94ecae5e54d /fs/btrfs/ctree.h
parent01f466580502c57001bf80fff709479fdb9e87a5 (diff)
Btrfs: Implement basic support for -ENOSPC
This is intended to prevent accidentally filling the drive. A determined user can still make things oops. It includes some accounting of the current bytes under delayed allocation, but this will change as things get optimized Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 2559f5d5d00a..10129cc6656f 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -346,6 +346,8 @@ struct btrfs_fs_info {
346 int closing; 346 int closing;
347 347
348 u64 total_pinned; 348 u64 total_pinned;
349 spinlock_t delalloc_lock;
350 u64 delalloc_bytes;
349}; 351};
350/* 352/*
351 * in ram representation of the tree. extent_root is used for all allocations 353 * in ram representation of the tree. extent_root is used for all allocations
@@ -1115,6 +1117,8 @@ int btrfs_csum_truncate(struct btrfs_trans_handle *trans,
1115 struct btrfs_root *root, struct btrfs_path *path, 1117 struct btrfs_root *root, struct btrfs_path *path,
1116 u64 isize); 1118 u64 isize);
1117/* inode.c */ 1119/* inode.c */
1120int btrfs_check_free_space(struct btrfs_root *root, u64 num_required,
1121 int for_del);
1118int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page); 1122int btrfs_page_mkwrite(struct vm_area_struct *vma, struct page *page);
1119int btrfs_readpage(struct file *file, struct page *page); 1123int btrfs_readpage(struct file *file, struct page *page);
1120void btrfs_delete_inode(struct inode *inode); 1124void btrfs_delete_inode(struct inode *inode);