linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
	Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: reada: Remove unused function
Date: Tue, 6 Jan 2015 13:22:01 +0100	[thread overview]
Message-ID: <20150106122201.GH6114@suse.cz> (raw)
In-Reply-To: <alpine.LRH.2.00.1501061141250.20601@twin.jikos.cz>

On Tue, Jan 06, 2015 at 11:42:07AM +0100, Jiri Kosina wrote:
> On Mon, 5 Jan 2015, David Sterba wrote:
> 
> > > Remove the function btrfs_reada_detach() that is not used anywhere.
> > > 
> > > This was partially found by using a static code analysis program called cppcheck.
> > > 
> > > Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> > 
> > No please, this function is part of public readahead API and similar
> > patch has been NACKed several times.
> 
> BTW how is this any kind of API for anybody, given it's not exported to 
> modules?

Scratch 'public' from the sentence, that was misleading. The API is internal to
btrfs.  The readahead can work in synchronous and asynchronous modes, this
function is API to the async mode.

Documented at reada.c:

 34 /*
 35  * This is the implementation for the generic read ahead framework.
 36  *
 37  * To trigger a readahead, btrfs_reada_add must be called. It will start
 38  * a read ahead for the given range [start, end) on tree root. The returned
 39  * handle can either be used to wait on the readahead to finish
 40  * (btrfs_reada_wait), or to send it to the background (btrfs_reada_detach).
 41  *
...

I've experimented with it for readdir speedups, but I haven't finished that due
to other problems.

      reply	other threads:[~2015-01-06 12:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-04  0:59 [PATCH] btrfs: reada: Remove unused function Rickard Strandqvist
2015-01-05 13:33 ` David Sterba
2015-01-06 10:42   ` Jiri Kosina
2015-01-06 12:22     ` 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=20150106122201.GH6114@suse.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=jbacik@fb.com \
    --cc=jkosina@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /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).