Message ID | 20200617091044.27846-2-nborisov@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Refactor prealloc_file_extent_cluster | expand |
Looks ok,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On Wed, Jun 17, 2020 at 12:10:42PM +0300, Nikolay Borisov wrote: > Extents in the extent cluster are guaranteed to be contiguous as such > the hole check inside the loop can never trigger. In fact this check > was never functional since it was added in 18513091af948 which came > after the commit introducing clustered/contiguous extents: 0257bb82d21b. Please use full commit references like 18513091af94 ("btrfs: update btrfs_space_info's bytes_may_use timely").
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 11d156995446..348985c8a559 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2604,9 +2604,6 @@ int prealloc_file_extent_cluster(struct inode *inode, lock_extent(&BTRFS_I(inode)->io_tree, start, end); num_bytes = end + 1 - start; - if (cur_offset < start) - btrfs_free_reserved_data_space_noquota(inode, - start - cur_offset); ret = btrfs_prealloc_file_range(inode, 0, start, num_bytes, num_bytes, end + 1, &alloc_hint);
Extents in the extent cluster are guaranteed to be contiguous as such the hole check inside the loop can never trigger. In fact this check was never functional since it was added in 18513091af948 which came after the commit introducing clustered/contiguous extents: 0257bb82d21b. Let's just remove it as it adds noise to the source. Signed-off-by: Nikolay Borisov <nborisov@suse.com> --- fs/btrfs/relocation.c | 3 --- 1 file changed, 3 deletions(-)