Btrfs: Pre-allocate space for data relocation
PATCH 11/12 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 <[email protected]>
---
fs/btrfs/ctree.h +3 -0
@@ -2406,6 +2406,9 @@ int btrfs_cont_expand(struct inode *inodint 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 */
fs/btrfs/inode.c +24 -20
91 lines not on this page · raw message
fs/btrfs/relocation.c +65 -25
145 lines not on this page · raw message