Loading fs/btrfs/extent-tree.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -2501,6 +2501,7 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans, u64 nr = 0; u64 nr = 0; u64 cur_byte; u64 cur_byte; u64 old_size; u64 old_size; unsigned long rem; struct btrfs_block_group_cache *cache; struct btrfs_block_group_cache *cache; struct btrfs_block_group_item *item; struct btrfs_block_group_item *item; struct btrfs_fs_info *info = root->fs_info; struct btrfs_fs_info *info = root->fs_info; Loading Loading @@ -2538,7 +2539,8 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans, struct btrfs_block_group_item); struct btrfs_block_group_item); btrfs_set_disk_block_group_used(leaf, item, 0); btrfs_set_disk_block_group_used(leaf, item, 0); if (nr % 3) { div_long_long_rem(nr, 3, &rem); if (rem) { btrfs_set_disk_block_group_flags(leaf, item, btrfs_set_disk_block_group_flags(leaf, item, BTRFS_BLOCK_GROUP_DATA); BTRFS_BLOCK_GROUP_DATA); } else { } else { Loading fs/btrfs/inode.c +7 −3 Original line number Original line Diff line number Diff line Loading @@ -81,9 +81,11 @@ int btrfs_check_free_space(struct btrfs_root *root, u64 num_required, int ret = 0; int ret = 0; if (for_del) if (for_del) thresh = (total * 90) / 100; thresh = total * 90; else else thresh = (total * 85) / 100; thresh = total * 85; do_div(thresh, 100); spin_lock(&root->fs_info->delalloc_lock); spin_lock(&root->fs_info->delalloc_lock); if (used + root->fs_info->delalloc_bytes + num_required > thresh) if (used + root->fs_info->delalloc_bytes + num_required > thresh) Loading Loading @@ -2475,7 +2477,9 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg) ret = -EFBIG; ret = -EFBIG; goto out_unlock; goto out_unlock; } } new_size = (new_size / root->sectorsize) * root->sectorsize; do_div(new_size, root->sectorsize); new_size *= root->sectorsize; printk("new size is %Lu\n", new_size); printk("new size is %Lu\n", new_size); if (new_size > old_size) { if (new_size > old_size) { Loading Loading
fs/btrfs/extent-tree.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -2501,6 +2501,7 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans, u64 nr = 0; u64 nr = 0; u64 cur_byte; u64 cur_byte; u64 old_size; u64 old_size; unsigned long rem; struct btrfs_block_group_cache *cache; struct btrfs_block_group_cache *cache; struct btrfs_block_group_item *item; struct btrfs_block_group_item *item; struct btrfs_fs_info *info = root->fs_info; struct btrfs_fs_info *info = root->fs_info; Loading Loading @@ -2538,7 +2539,8 @@ int btrfs_grow_extent_tree(struct btrfs_trans_handle *trans, struct btrfs_block_group_item); struct btrfs_block_group_item); btrfs_set_disk_block_group_used(leaf, item, 0); btrfs_set_disk_block_group_used(leaf, item, 0); if (nr % 3) { div_long_long_rem(nr, 3, &rem); if (rem) { btrfs_set_disk_block_group_flags(leaf, item, btrfs_set_disk_block_group_flags(leaf, item, BTRFS_BLOCK_GROUP_DATA); BTRFS_BLOCK_GROUP_DATA); } else { } else { Loading
fs/btrfs/inode.c +7 −3 Original line number Original line Diff line number Diff line Loading @@ -81,9 +81,11 @@ int btrfs_check_free_space(struct btrfs_root *root, u64 num_required, int ret = 0; int ret = 0; if (for_del) if (for_del) thresh = (total * 90) / 100; thresh = total * 90; else else thresh = (total * 85) / 100; thresh = total * 85; do_div(thresh, 100); spin_lock(&root->fs_info->delalloc_lock); spin_lock(&root->fs_info->delalloc_lock); if (used + root->fs_info->delalloc_bytes + num_required > thresh) if (used + root->fs_info->delalloc_bytes + num_required > thresh) Loading Loading @@ -2475,7 +2477,9 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg) ret = -EFBIG; ret = -EFBIG; goto out_unlock; goto out_unlock; } } new_size = (new_size / root->sectorsize) * root->sectorsize; do_div(new_size, root->sectorsize); new_size *= root->sectorsize; printk("new size is %Lu\n", new_size); printk("new size is %Lu\n", new_size); if (new_size > old_size) { if (new_size > old_size) { Loading