linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 00/10] Cleanup unnecessary get_extent parameters
Date: Tue, 7 Nov 2017 21:13:03 +0100	[thread overview]
Message-ID: <20171107201302.GC27557@twin.jikos.cz> (raw)
In-Reply-To: <831c9c09-c974-eb38-0e26-fa9a6e8309ee@suse.com>

On Mon, Nov 06, 2017 at 11:26:54PM +0200, Nikolay Borisov wrote:
> 
> 
> On  6.11.2017 21:30, David Sterba wrote:
> > There are several functions that take a generic get_extent parameter, but not
> > all of them use it to distinguish between btree_get_exnent (for metadata) and
> > btrfs_get_extent (for data). This is namely extent_read_full_page and
> > __do_readpage.
> 
> I wonder whether we can do some similar collpasing withe some of the
> hooks we have i.e. readpage_end_io_hook (resp.
> btrfs_readpage_end_io_hook and btree_readpage_end_io_hook). All those
> callbacks don't necessarily help readability...

Some of the callbacks passed as parameters can be possibly pushed down
the callstack, the only difference is btree_inode vs file extents.
Instead of the uppper caller switch, the right function can be called
based on the inode number (btree_inode has 1).

Josef has some ideas/patches to get rid of the btree_inode completely so
cleaning up the callback might not be worth. There's still some
potential to reduce the arguments to the various callbacks, I have
patches for that. This is a relatively easy and safe so I would still
send them, as the btree_inode removal will be probably intrusive and the
ETA for such changes is unpredictable.

      reply	other threads:[~2017-11-07 20:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 19:30 [PATCH 00/10] Cleanup unnecessary get_extent parameters David Sterba
2017-11-06 19:30 ` [PATCH 01/10] btrfs: sink get_extent parameter to extent_writepages David Sterba
2017-11-06 19:30 ` [PATCH 02/10] btrfs: sink get_extent parameter to extent_write_locked_range David Sterba
2017-11-06 19:30 ` [PATCH 03/10] btrfs: sink get_extent parameter to extent_write_full_page David Sterba
2017-11-06 19:30 ` [PATCH 04/10] btrfs: drop get_extent from extent_page_data David Sterba
2017-11-06 19:30 ` [PATCH 05/10] btrfs: sink get_extent parameter to extent_fiemap David Sterba
2017-11-06 19:30 ` [PATCH 06/10] btrfs: sink get_extent parameter to get_extent_skip_holes David Sterba
2017-11-06 19:30 ` [PATCH 07/10] btrfs: sink get_extent parameter to extent_readpages David Sterba
2017-11-06 19:31 ` [PATCH 08/10] btrfs: sink get_extent parameter to __extent_readpages David Sterba
2017-11-06 19:31 ` [PATCH 09/10] btrfs: sink get_extent parameter to __do_contiguous_readpages David Sterba
2017-11-06 19:31 ` [PATCH 10/10] btrfs: sink get_extent parameter to read_extent_buffer_pages David Sterba
2017-11-06 21:26 ` [PATCH 00/10] Cleanup unnecessary get_extent parameters Nikolay Borisov
2017-11-07 20:13   ` David Sterba [this message]

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=20171107201302.GC27557@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    /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).