All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 07/10] btrfs: Remove unused parameter from extent_clear_unlock_delalloc
Date: Mon, 21 Aug 2017 12:43:47 +0300	[thread overview]
Message-ID: <1503308630-6652-8-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1503308630-6652-1-git-send-email-nborisov@suse.com>

This variable was added as part of ba8b04c1d4ad ("btrfs: extend
btrfs_set_extent_delalloc and its friends to support in-band dedupe and subpage size patchset")
however those patchsets haven't materialized yet. Let's remove the argument and 
when the time comes (e.g. whiever patchset lands first) should introduce all of 
its pre-requisites in the same series. 

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---

Hello David, 

I was a ambivalent whether I should send this one since it removes some
preparatory work. However, the said patchsets haven't really moved anywhere for
quite some time and will likely require substantial amount of rebasing effort, 
so let's remove *possibly* outdated leftovers. But then again, I have no 
strong opinion on this. 

 fs/btrfs/extent_io.c |  3 +--
 fs/btrfs/extent_io.h |  2 +-
 fs/btrfs/inode.c     | 24 ++++++++----------------
 3 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d17783d70228..5eab66ec74f3 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1739,8 +1739,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,
-				 unsigned clear_bits,
+				 struct page *locked_page, unsigned clear_bits,
 				 unsigned long page_ops)
 {
 	clear_extent_bit(&BTRFS_I(inode)->io_tree, start, end, clear_bits, 1, 0,
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index faffa28ba707..ff71256f6fae 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -492,7 +492,7 @@ int map_private_extent_buffer(const struct extent_buffer *eb,
 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 *btrfs_bio_alloc(struct block_device *bdev, u64 first_byte);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f1b3d6146924..98b56aca0a6f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -583,7 +583,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 |
@@ -836,8 +836,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);
@@ -856,7 +854,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);
@@ -874,8 +872,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 |
 				     EXTENT_DELALLOC_NEW |
 				     EXTENT_DEFRAG | EXTENT_DO_ACCOUNTING,
@@ -970,8 +966,7 @@ static noinline int cow_file_range(struct inode *inode,
 		ret = cow_file_range_inline(root, inode, start, end, 0,
 					BTRFS_COMPRESS_NONE, NULL);
 		if (ret == 0) {
-			extent_clear_unlock_delalloc(inode, start, end,
-				     delalloc_end, NULL,
+			extent_clear_unlock_delalloc(inode, start, end, NULL,
 				     EXTENT_LOCKED | EXTENT_DELALLOC |
 				     EXTENT_DELALLOC_NEW |
 				     EXTENT_DEFRAG, PAGE_UNLOCK |
@@ -1057,7 +1052,7 @@ static noinline int cow_file_range(struct inode *inode,
 
 		extent_clear_unlock_delalloc(inode, start,
 					     start + ram_size - 1,
-					     delalloc_end, locked_page,
+					     locked_page,
 					     EXTENT_LOCKED | EXTENT_DELALLOC,
 					     page_ops);
 		if (disk_num_bytes < cur_alloc_size)
@@ -1103,7 +1098,6 @@ static noinline int cow_file_range(struct inode *inode,
 	if (extent_reserved) {
 		extent_clear_unlock_delalloc(inode, start,
 					     start + cur_alloc_size,
-					     start + cur_alloc_size,
 					     locked_page,
 					     clear_bits,
 					     page_ops);
@@ -1111,8 +1105,7 @@ static noinline int cow_file_range(struct inode *inode,
 		if (start >= end)
 			goto out;
 	}
-	extent_clear_unlock_delalloc(inode, start, end, delalloc_end,
-				     locked_page,
+	extent_clear_unlock_delalloc(inode, start, end, locked_page,
 				     clear_bits | EXTENT_CLEAR_DATA_RESV,
 				     page_ops);
 	goto out;
@@ -1285,8 +1278,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
 
 	path = btrfs_alloc_path();
 	if (!path) {
-		extent_clear_unlock_delalloc(inode, start, end, end,
-					     locked_page,
+		extent_clear_unlock_delalloc(inode, start, end, locked_page,
 					     EXTENT_LOCKED | EXTENT_DELALLOC |
 					     EXTENT_DO_ACCOUNTING |
 					     EXTENT_DEFRAG, PAGE_UNLOCK |
@@ -1497,7 +1489,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
 						      num_bytes);
 
 		extent_clear_unlock_delalloc(inode, cur_offset,
-					     cur_offset + num_bytes - 1, end,
+					     cur_offset + num_bytes - 1,
 					     locked_page, EXTENT_LOCKED |
 					     EXTENT_DELALLOC |
 					     EXTENT_CLEAR_DATA_RESV,
@@ -1533,7 +1525,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
 
 error:
 	if (ret && cur_offset < end)
-		extent_clear_unlock_delalloc(inode, cur_offset, end, end,
+		extent_clear_unlock_delalloc(inode, cur_offset, end,
 					     locked_page, EXTENT_LOCKED |
 					     EXTENT_DELALLOC | EXTENT_DEFRAG |
 					     EXTENT_DO_ACCOUNTING, PAGE_UNLOCK |
-- 
2.7.4


  parent reply	other threads:[~2017-08-21  9:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21  9:43 [PATCH 00/10] Unused parameter cleanup Nikolay Borisov
2017-08-21  9:43 ` [PATCH 01/10] btrfs: Remove chunk_objectid parameter of btrfs_alloc_dev_extent Nikolay Borisov
2017-08-21 13:02   ` Timofey Titovets
2017-08-21  9:43 ` [PATCH 02/10] btrfs: remove superfluous chunk_tree argument from btrfs_alloc_dev_extent Nikolay Borisov
2017-08-21  9:43 ` [PATCH 03/10] btrfs: Remove unused variable Nikolay Borisov
2017-08-21 13:06   ` Timofey Titovets
2017-08-21  9:43 ` [PATCH 04/10] btrfs: Remove unused parameters from various functions Nikolay Borisov
2017-08-21  9:43 ` [PATCH 05/10] btrfs: Remove unused arguments from btrfs_changed_cb_t Nikolay Borisov
2017-08-21  9:43 ` [PATCH 06/10] btrfs: Remove unused parameter from check_direct_IO Nikolay Borisov
2017-08-21 12:25   ` Timofey Titovets
2017-09-07 19:09   ` David Sterba
2017-08-21  9:43 ` Nikolay Borisov [this message]
2017-09-07 19:20   ` [PATCH 07/10] btrfs: Remove unused parameter from extent_clear_unlock_delalloc David Sterba
2017-08-21  9:43 ` [PATCH 08/10] btrfs: remove unused parameter in cow_file_range Nikolay Borisov
2017-09-25 12:18   ` Nikolay Borisov
2017-09-25 13:22     ` Qu Wenruo
2017-09-25 13:29     ` David Sterba
2017-08-21  9:43 ` [PATCH 09/10] btrfs: Rework error handling of add_extent_mapping in __btrfs_alloc_chunk Nikolay Borisov
2017-09-07 19:26   ` David Sterba
2017-08-21  9:43 ` [PATCH 10/10] btrfs: Remove redundant argument of __link_block_group Nikolay Borisov
2017-09-07 19:33   ` David Sterba
2017-08-21 17:36 ` [PATCH 00/10] Unused parameter cleanup Josef Bacik
2017-09-07 19:39 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1503308630-6652-8-git-send-email-nborisov@suse.com \
    --to=nborisov@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.