Loading fs/btrfs/ctree.h +1 −1 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,7 @@ struct btrfs_ioctl_defrag_range_args { #define BTRFS_MOUNT_NOLOGREPLAY (1 << 27) #define BTRFS_DEFAULT_COMMIT_INTERVAL (30) #define BTRFS_DEFAULT_MAX_INLINE (8192) #define BTRFS_DEFAULT_MAX_INLINE (2048) #define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) Loading fs/btrfs/file.c +18 −22 Original line number Diff line number Diff line Loading @@ -1533,12 +1533,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, reserve_bytes = round_up(write_bytes + sector_offset, root->sectorsize); if (BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC)) { ret = check_can_nocow(inode, pos, &write_bytes); if (ret < 0) break; if (ret > 0) { if ((BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC)) && check_can_nocow(inode, pos, &write_bytes) > 0) { /* * For nodata cow case, no need to reserve * data space. Loading @@ -1550,12 +1547,11 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, */ num_pages = DIV_ROUND_UP(write_bytes + offset, PAGE_CACHE_SIZE); reserve_bytes = round_up(write_bytes + sector_offset, reserve_bytes = round_up(write_bytes + sector_offset, root->sectorsize); goto reserve_metadata; } } ret = btrfs_check_data_free_space(inode, pos, write_bytes); if (ret < 0) break; Loading fs/btrfs/ioctl.c +0 −2 Original line number Diff line number Diff line Loading @@ -2093,8 +2093,6 @@ static noinline int search_ioctl(struct inode *inode, key.offset = (u64)-1; root = btrfs_read_fs_root_no_name(info, &key); if (IS_ERR(root)) { btrfs_err(info, "could not find root %llu", sk->tree_id); btrfs_free_path(path); return -ENOENT; } Loading fs/btrfs/tests/btrfs-tests.c +0 −6 Original line number Diff line number Diff line Loading @@ -189,12 +189,6 @@ btrfs_alloc_dummy_block_group(unsigned long length) kfree(cache); return NULL; } cache->fs_info = btrfs_alloc_dummy_fs_info(); if (!cache->fs_info) { kfree(cache->free_space_ctl); kfree(cache); return NULL; } cache->key.objectid = 0; cache->key.offset = length; Loading fs/btrfs/tests/free-space-tree-tests.c +1 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ static int run_test(test_func_t test_func, int bitmaps) cache->bitmap_low_thresh = 0; cache->bitmap_high_thresh = (u32)-1; cache->needs_free_space = 1; cache->fs_info = root->fs_info; btrfs_init_dummy_trans(&trans); Loading Loading
fs/btrfs/ctree.h +1 −1 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,7 @@ struct btrfs_ioctl_defrag_range_args { #define BTRFS_MOUNT_NOLOGREPLAY (1 << 27) #define BTRFS_DEFAULT_COMMIT_INTERVAL (30) #define BTRFS_DEFAULT_MAX_INLINE (8192) #define BTRFS_DEFAULT_MAX_INLINE (2048) #define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) Loading
fs/btrfs/file.c +18 −22 Original line number Diff line number Diff line Loading @@ -1533,12 +1533,9 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, reserve_bytes = round_up(write_bytes + sector_offset, root->sectorsize); if (BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC)) { ret = check_can_nocow(inode, pos, &write_bytes); if (ret < 0) break; if (ret > 0) { if ((BTRFS_I(inode)->flags & (BTRFS_INODE_NODATACOW | BTRFS_INODE_PREALLOC)) && check_can_nocow(inode, pos, &write_bytes) > 0) { /* * For nodata cow case, no need to reserve * data space. Loading @@ -1550,12 +1547,11 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, */ num_pages = DIV_ROUND_UP(write_bytes + offset, PAGE_CACHE_SIZE); reserve_bytes = round_up(write_bytes + sector_offset, reserve_bytes = round_up(write_bytes + sector_offset, root->sectorsize); goto reserve_metadata; } } ret = btrfs_check_data_free_space(inode, pos, write_bytes); if (ret < 0) break; Loading
fs/btrfs/ioctl.c +0 −2 Original line number Diff line number Diff line Loading @@ -2093,8 +2093,6 @@ static noinline int search_ioctl(struct inode *inode, key.offset = (u64)-1; root = btrfs_read_fs_root_no_name(info, &key); if (IS_ERR(root)) { btrfs_err(info, "could not find root %llu", sk->tree_id); btrfs_free_path(path); return -ENOENT; } Loading
fs/btrfs/tests/btrfs-tests.c +0 −6 Original line number Diff line number Diff line Loading @@ -189,12 +189,6 @@ btrfs_alloc_dummy_block_group(unsigned long length) kfree(cache); return NULL; } cache->fs_info = btrfs_alloc_dummy_fs_info(); if (!cache->fs_info) { kfree(cache->free_space_ctl); kfree(cache); return NULL; } cache->key.objectid = 0; cache->key.offset = length; Loading
fs/btrfs/tests/free-space-tree-tests.c +1 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ static int run_test(test_func_t test_func, int bitmaps) cache->bitmap_low_thresh = 0; cache->bitmap_high_thresh = (u32)-1; cache->needs_free_space = 1; cache->fs_info = root->fs_info; btrfs_init_dummy_trans(&trans); Loading