Re: [PATCH] btrfs: reada: Remove unused function

From: David Sterba
Date: Tue Jan 06 2015 - 07:22:08 EST


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@xxxxxxxxxxxxxxxxxx>
> >
> > 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/