All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 7/7] btrfs: remove local blocksize variable in reada_find_extent
Date: Wed, 15 Mar 2017 17:02:42 +0100	[thread overview]
Message-ID: <9355f3bb85dcdb05a30ad8f7e11bedae2f08afb0.1489593696.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1489593696.git.dsterba@suse.com>

The name is misleading and the local variable serves no purpose.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/reada.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
index 91df381a60ce..64425c3fe4f5 100644
--- a/fs/btrfs/reada.c
+++ b/fs/btrfs/reada.c
@@ -318,7 +318,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
 	struct btrfs_bio *bbio = NULL;
 	struct btrfs_device *dev;
 	struct btrfs_device *prev_dev;
-	u32 blocksize;
 	u64 length;
 	int real_stripes;
 	int nzones = 0;
@@ -339,7 +338,6 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
 	if (!re)
 		return NULL;
 
-	blocksize = fs_info->nodesize;
 	re->logical = logical;
 	re->top = *top;
 	INIT_LIST_HEAD(&re->extctl);
@@ -349,10 +347,10 @@ static struct reada_extent *reada_find_extent(struct btrfs_fs_info *fs_info,
 	/*
 	 * map block
 	 */
-	length = blocksize;
+	length = fs_info->nodesize;
 	ret = btrfs_map_block(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical,
 			&length, &bbio, 0);
-	if (ret || !bbio || length < blocksize)
+	if (ret || !bbio || length < fs_info->nodesize)
 		goto error;
 
 	if (bbio->num_stripes > BTRFS_MAX_MIRRORS) {
-- 
2.12.0


  parent reply	other threads:[~2017-03-15 16:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 16:02 [PATCH 0/7] Readahead clenups David Sterba
2017-03-15 16:02 ` [PATCH 1/7] btrfs: preallocate radix tree node for readahead David Sterba
2017-03-20 20:40   ` Liu Bo
2017-03-15 16:02 ` [PATCH 2/7] btrfs: use simpler readahead zone lookups David Sterba
2017-03-20 20:44   ` Liu Bo
2017-03-31 17:33   ` David Sterba
2017-03-15 16:02 ` [PATCH 3/7] btrfs: preallocate radix tree node for global readahead tree David Sterba
2017-03-20 20:58   ` Liu Bo
2017-03-15 16:02 ` [PATCH 4/7] btrfs: remove redundant parameter from btree_readahead_hook David Sterba
2017-03-20 21:00   ` Liu Bo
2017-03-15 16:02 ` [PATCH 5/7] btrfs: remove redundant parameter from reada_find_zone David Sterba
2017-03-20 21:03   ` Liu Bo
2017-03-15 16:02 ` [PATCH 6/7] btrfs: remove redundant parameter from reada_start_machine_dev David Sterba
2017-03-20 21:04   ` Liu Bo
2017-03-15 16:02 ` David Sterba [this message]
2017-03-20 21:04   ` [PATCH 7/7] btrfs: remove local blocksize variable in reada_find_extent Liu Bo

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=9355f3bb85dcdb05a30ad8f7e11bedae2f08afb0.1489593696.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --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.