Re: [PATCH 1/2] Btrfs: remove unused delalloc_end parameter
On Tue, Mar 07, 2017 at 06:35:02PM +, Filipe Manana wrote: > On Tue, Mar 7, 2017 at 4:05 PM, David Sterbawrote: > > On Mon, Mar 06, 2017 at 11:32:47PM +, fdman...@kernel.org wrote: > >> From: Filipe Manana > >> > >> The delalloc_end parameter for extent_clear_unlock_delalloc() is never > >> used, and only making the code for all callers longer and more complex. > >> Just remove it. > > > > It's been added on purpose > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dda3245eca18c73413a854a834c41fc770feb0dd > > > > "btrfs: expand cow_file_range() to support in-band dedup and > > subpage-blocksize" > > > > so we can merge both mentioned patchsets for testing. > > I definitely missed that. To be honest I was finding it strange that > none of the usual cleanup fanatics noticed it before. I was disappointed for a minute that I couldn't remove it, you bet. > Anyway I'm sending a v2 of the 2nd patch so that it works correctly on > top of Qu's patchset that I reviewed recently. I've added Qu's patches > to my 4.11 integration branch just so that I could work on top of > them, feel free to pick stuff from there if convenient or ignore > otherwise. Let's keep it in your branch then. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] Btrfs: remove unused delalloc_end parameter
On Tue, Mar 7, 2017 at 4:05 PM, David Sterbawrote: > On Mon, Mar 06, 2017 at 11:32:47PM +, fdman...@kernel.org wrote: >> From: Filipe Manana >> >> The delalloc_end parameter for extent_clear_unlock_delalloc() is never >> used, and only making the code for all callers longer and more complex. >> Just remove it. > > It's been added on purpose > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dda3245eca18c73413a854a834c41fc770feb0dd > > "btrfs: expand cow_file_range() to support in-band dedup and > subpage-blocksize" > > so we can merge both mentioned patchsets for testing. I definitely missed that. To be honest I was finding it strange that none of the usual cleanup fanatics noticed it before. Anyway I'm sending a v2 of the 2nd patch so that it works correctly on top of Qu's patchset that I reviewed recently. I've added Qu's patches to my 4.11 integration branch just so that I could work on top of them, feel free to pick stuff from there if convenient or ignore otherwise. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] Btrfs: remove unused delalloc_end parameter
On Mon, Mar 06, 2017 at 11:32:47PM +, fdman...@kernel.org wrote: > From: Filipe Manana> > The delalloc_end parameter for extent_clear_unlock_delalloc() is never > used, and only making the code for all callers longer and more complex. > Just remove it. It's been added on purpose https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dda3245eca18c73413a854a834c41fc770feb0dd "btrfs: expand cow_file_range() to support in-band dedup and subpage-blocksize" so we can merge both mentioned patchsets for testing. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] Btrfs: remove unused delalloc_end parameter
From: Filipe MananaThe delalloc_end parameter for extent_clear_unlock_delalloc() is never used, and only making the code for all callers longer and more complex. Just remove it. Signed-off-by: Filipe Manana --- fs/btrfs/extent_io.c | 2 +- fs/btrfs/extent_io.h | 2 +- fs/btrfs/inode.c | 32 +--- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 28e8192..2cce08b 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1760,7 +1760,7 @@ static int __process_pages_contig(struct address_space *mapping, } void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end, -u64 delalloc_end, struct page *locked_page, +struct page *locked_page, unsigned clear_bits, unsigned long page_ops) { diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 3e4fad4..b12f4db 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -452,7 +452,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long offset, void extent_range_clear_dirty_for_io(struct inode *inode, u64 start, u64 end); void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end); void extent_clear_unlock_delalloc(struct inode *inode, u64 start, u64 end, -u64 delalloc_end, struct page *locked_page, +struct page *locked_page, unsigned bits_to_clear, unsigned long page_ops); struct bio * diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b2bc07a..07bee7d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -106,7 +106,7 @@ static int btrfs_truncate(struct inode *inode); static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent); static noinline int cow_file_range(struct inode *inode, struct page *locked_page, - u64 start, u64 end, u64 delalloc_end, + u64 start, u64 end, int *page_started, unsigned long *nr_written, int unlock, struct btrfs_dedupe_hash *hash); static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 len, @@ -558,7 +558,7 @@ static noinline void compress_file_range(struct inode *inode, * we don't need to create any more async work items. * Unlock and free up our temp pages. */ - extent_clear_unlock_delalloc(inode, start, end, end, + extent_clear_unlock_delalloc(inode, start, end, NULL, clear_flags, PAGE_UNLOCK | PAGE_CLEAR_DIRTY | @@ -713,8 +713,6 @@ static noinline void submit_compressed_extents(struct inode *inode, async_extent->start, async_extent->start + async_extent->ram_size - 1, -async_extent->start + -async_extent->ram_size - 1, _started, _written, 0, NULL); @@ -810,8 +808,6 @@ static noinline void submit_compressed_extents(struct inode *inode, extent_clear_unlock_delalloc(inode, async_extent->start, async_extent->start + async_extent->ram_size - 1, - async_extent->start + - async_extent->ram_size - 1, NULL, EXTENT_LOCKED | EXTENT_DELALLOC, PAGE_UNLOCK | PAGE_CLEAR_DIRTY | PAGE_SET_WRITEBACK); @@ -831,7 +827,7 @@ static noinline void submit_compressed_extents(struct inode *inode, tree->ops->writepage_end_io_hook(p, start, end, NULL, 0); p->mapping = NULL; - extent_clear_unlock_delalloc(inode, start, end, end, + extent_clear_unlock_delalloc(inode, start, end, NULL, 0, PAGE_END_WRITEBACK | PAGE_SET_ERROR); @@ -849,8 +845,6 @@ static noinline void submit_compressed_extents(struct inode *inode, extent_clear_unlock_delalloc(inode,