From: Eric Sandeen <sandeen@redhat.com>
To: dsterba@suse.cz, linux-btrfs <linux-btrfs@vger.kernel.org>,
miaox@cn.fujitsu.com
Subject: Re: [PATCH] btrfs: make static code static & remove dead code
Date: Mon, 22 Apr 2013 11:01:09 -0500 [thread overview]
Message-ID: <51755EC5.7080706@redhat.com> (raw)
In-Reply-To: <20130422155545.GS16427@twin.jikos.cz>
On 4/22/13 10:55 AM, David Sterba wrote:
> On Mon, Apr 22, 2013 at 10:24:12AM -0500, Eric Sandeen wrote:
>>>> btrfs_reada_detach()
>>>
>>> That's an API for readahead, thhugh maybe not used now as RA is not used
>>> and at all scenarios where it could.
>>
>> Ok, if it's useful to keep it around just for symmetry I could
>> understand that.
>
> reada.c:
> /*
> * This is the implementation for the generic read ahead framework.
> *
> * To trigger a readahead, btrfs_reada_add must be called. It will start
> * a read ahead for the given range [start, end) on tree root. The returned
> * handle can either be used to wait on the readahead to finish
> * (btrfs_reada_wait), or to send it to the background (btrfs_reada_detach).
>
>>>> btrfs_scrub_cancel_devid()
>>>
>>> Looks like there's a missing userspace counterpart, cancelling scrub by
>>> device is possible by design.
>>
>> Maybe one for Arne to answer? Yeah, I don't see it in the manpage
>> or in userspace, so *shrug* where is the design?
>
> Scrub can be started on one device, cancel is just part of the command set.
>
> $ ./btrfs scrub cancel --help
> usage: btrfs scrub cancel <path>|<device>
> Cancel a running scrub
Right, but device is different from devid, no?
i.e. btrfs replace start can take a devid or a device, and checks for
if (is_numerical(srcdev)); this doesn't look implemented for
scrub cancel. I guess it could be.
>>>> btrfs_start_transaction_lflush()
>>>
>>> Transcaction API, removing the func does not make sense without removing
>>> BTRFS_RESERVE_FLUSH_LIMIT at the same time.
>>
>> Not sure I understand that, btrfs_block_rsv_refill() still uses that macro,
>> but I'm probably not understanding the code or missing your point.
>
> The function wraps usage of the macro/enum in the transaction_start_* functions
> and it has been used at some point, we may want to use it again as allows to
> start a transaction in some limited context. It's been added by Miao,
>
>> I'll admit to doing the removal mechanically, hopefully those with
>> particular affinity to any of the removed functions can speak
>> up. :)
>
> Removing dead code sometimes points out bugs, it's always good to do a quick
> review and do patch archeology first. Which makes it less appealing as a
> low-hanging fruit :)
Fair enough, I'm appropriately chastised. :)
-Eric
> david
>
next prev parent reply other threads:[~2013-04-22 16:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 19:21 [PATCH] btrfs: make static code static & remove dead code Eric Sandeen
2013-04-20 0:45 ` Wang Shilong
2013-04-20 15:01 ` Wang Shilong
2013-04-20 17:42 ` Arne Jansen
2013-04-22 15:05 ` David Sterba
2013-04-22 15:24 ` Eric Sandeen
2013-04-22 15:55 ` David Sterba
2013-04-22 16:01 ` Eric Sandeen [this message]
2013-04-24 13:03 ` David Sterba
2013-04-25 20:41 ` [PATCH V2] " Eric Sandeen
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=51755EC5.7080706@redhat.com \
--to=sandeen@redhat.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaox@cn.fujitsu.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 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.