linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3.1 3/7] btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots()
Date: Tue, 15 Jan 2019 08:54:27 +0800	[thread overview]
Message-ID: <8b353e42-90b3-235f-b172-6f0cb55b2feb@gmx.com> (raw)
In-Reply-To: <20190114172107.GE2900@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1224 bytes --]



On 2019/1/15 上午1:21, David Sterba wrote:
> On Mon, Jan 07, 2019 at 01:41:47PM +0800, Qu Wenruo wrote:
>> +/*
>> + * Helper structure to keep record of a file tree whose reloc
>> + * root needs to be cleaned up.
>> + *
>> + * Since reloc_control is used less frequently than btrfs_root, this should
>> + * prevent us to add another structure in btrfs_root.
>> + */
>> +struct dirty_source_root {
>> +	struct rb_node node;
>> +
>> +	/* Root must be file tree */
> 
> The naming starts here and is used in the following patches too: the
> naming is IMO confusing, here it's still ok but variables like
> 'file_bytenr' or 'file_parent' sound weird in context of relocation.

'file_bytenr' and 'file_parent' are introduced in the 5th patch.

My main concern of using traditional naming like 'source/destination'
is, for swapped blocks, source/destination needs extra context to
determine which is which.

So I tend to use naming which shows directly to which tree the block
belongs.

> 
> The file tree is the subvolume right, or would it be confusing in
> another way?
> 
So did you mean use something like 'subv_bytenr' and 'subv_generation'?

I'm OK for this naming.

Thanks,
Qu


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-01-15  0:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  5:41 [PATCH v3.1 0/7] btrfs: qgroup: Delay subtree scan to reduce overhead Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 1/7] btrfs: qgroup: Move reserved data account from btrfs_delayed_ref_head to btrfs_qgroup_extent_record Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 2/7] btrfs: qgroup: Don't trigger backref walk at delayed ref insert time Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 3/7] btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots() Qu Wenruo
2019-01-14 17:04   ` David Sterba
2019-01-14 17:11   ` David Sterba
2019-01-15  0:44     ` Qu Wenruo
2019-01-14 17:21   ` David Sterba
2019-01-15  0:54     ` Qu Wenruo [this message]
2019-01-07  5:41 ` [PATCH v3.1 4/7] btrfs: qgroup: Refactor btrfs_qgroup_trace_subtree_swap() Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 5/7] btrfs: qgroup: Introduce per-root swapped blocks infrastructure Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 6/7] btrfs: qgroup: Use delayed subtree rescan for balance Qu Wenruo
2019-01-07  5:41 ` [PATCH v3.1 7/7] btrfs: qgroup: Cleanup old subtree swap code Qu Wenruo
2019-01-08 14:27 ` [PATCH v3.1 0/7] btrfs: qgroup: Delay subtree scan to reduce overhead David Sterba

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=8b353e42-90b3-235f-b172-6f0cb55b2feb@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@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).