diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2010-05-16 16:49:59 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-05-25 16:34:53 +0200 |
commit | efa56464562991b8c24f965199888806bd8c4b38 (patch) | |
tree | e7c7e69e2931674ddf4f14ac08dfdf43b45de0f4 /fs/btrfs/ctree.h | |
parent | Btrfs: Metadata ENOSPC handling for tree log (diff) | |
download | linux-efa56464562991b8c24f965199888806bd8c4b38.tar.xz linux-efa56464562991b8c24f965199888806bd8c4b38.zip |
Btrfs: Pre-allocate space for data relocation
Pre-allocate space for data relocation. This can detect ENOPSC
condition caused by fragmentation of free space.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index fc324f9fcb42..65530837d04b 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2420,6 +2420,9 @@ int btrfs_cont_expand(struct inode *inode, loff_t size); int btrfs_invalidate_inodes(struct btrfs_root *root); void btrfs_add_delayed_iput(struct inode *inode); void btrfs_run_delayed_iputs(struct btrfs_root *root); +int btrfs_prealloc_file_range(struct inode *inode, int mode, + u64 start, u64 num_bytes, u64 min_size, + loff_t actual_len, u64 *alloc_hint); extern const struct dentry_operations btrfs_dentry_operations; /* ioctl.c */ |