From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 4/7] btrfs: remove redundant parameter from btree_readahead_hook
Date: Mon, 20 Mar 2017 14:00:00 -0700 [thread overview]
Message-ID: <20170320210000.GG5540@lim.localdomain> (raw)
In-Reply-To: <eec160ff8a025b4580b374a525e678c3457c1a6a.1489593696.git.dsterba@suse.com>
On Wed, Mar 15, 2017 at 05:02:33PM +0100, David Sterba wrote:
> We can read fs_info from eb.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Thanks,
-liubo
>
> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
> fs/btrfs/ctree.h | 3 +--
> fs/btrfs/disk-io.c | 4 ++--
> fs/btrfs/reada.c | 4 ++--
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 29b7fc28c607..173fac68323a 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3671,8 +3671,7 @@ struct reada_control *btrfs_reada_add(struct btrfs_root *root,
> struct btrfs_key *start, struct btrfs_key *end);
> int btrfs_reada_wait(void *handle);
> void btrfs_reada_detach(void *handle);
> -int btree_readahead_hook(struct btrfs_fs_info *fs_info,
> - struct extent_buffer *eb, int err);
> +int btree_readahead_hook(struct extent_buffer *eb, int err);
>
> static inline int is_fstree(u64 rootid)
> {
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 1d4c30327247..995b28179af9 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -762,7 +762,7 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
> err:
> if (reads_done &&
> test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
> - btree_readahead_hook(fs_info, eb, ret);
> + btree_readahead_hook(eb, ret);
>
> if (ret) {
> /*
> @@ -787,7 +787,7 @@ static int btree_io_failed_hook(struct page *page, int failed_mirror)
> eb->read_mirror = failed_mirror;
> atomic_dec(&eb->io_pages);
> if (test_and_clear_bit(EXTENT_BUFFER_READAHEAD, &eb->bflags))
> - btree_readahead_hook(eb->fs_info, eb, -EIO);
> + btree_readahead_hook(eb, -EIO);
> return -EIO; /* we fixed nothing */
> }
>
> diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c
> index 4c5a9b241cab..5edf7328f67d 100644
> --- a/fs/btrfs/reada.c
> +++ b/fs/btrfs/reada.c
> @@ -209,9 +209,9 @@ static void __readahead_hook(struct btrfs_fs_info *fs_info,
> return;
> }
>
> -int btree_readahead_hook(struct btrfs_fs_info *fs_info,
> - struct extent_buffer *eb, int err)
> +int btree_readahead_hook(struct extent_buffer *eb, int err)
> {
> + struct btrfs_fs_info *fs_info = eb->fs_info;
> int ret = 0;
> struct reada_extent *re;
>
> --
> 2.12.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-03-20 21:00 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 [this message]
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 ` [PATCH 7/7] btrfs: remove local blocksize variable in reada_find_extent David Sterba
2017-03-20 21:04 ` 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=20170320210000.GG5540@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).