linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org, Filipe Manana <fdmanana@suse.com>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	Naohiro Aota <naohiro.aota@wdc.com>
Subject: Re: [PATCH 2/6] btrfs: zoned: add a dedicated data relocation block group
Date: Tue, 7 Sep 2021 13:52:07 +0200	[thread overview]
Message-ID: <20210907115207.GL3379@twin.jikos.cz> (raw)
In-Reply-To: <ac2e5fc11c47dfc3626999460f606b980b0f5523.1630679569.git.johannes.thumshirn@wdc.com>

On Fri, Sep 03, 2021 at 11:44:43PM +0900, Johannes Thumshirn wrote:
> index 8cc0b29e24ee..344ba70315d8 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -1017,6 +1017,8 @@ struct btrfs_fs_info {
>  	struct mutex zoned_meta_io_lock;
>  	spinlock_t treelog_bg_lock;
>  	u64 treelog_bg;
> +	spinlock_t relocation_bg_lock;
> +	u64 data_reloc_bg;

Please add some comments for the new members.

> --- a/fs/btrfs/zoned.h
> +++ b/fs/btrfs/zoned.h
> @@ -347,4 +347,13 @@ static inline void btrfs_clear_treelog_bg(struct btrfs_block_group *bg)
>  	spin_unlock(&fs_info->treelog_bg_lock);
>  }
>  
> +static inline void btrfs_clear_data_reloc_bg(struct btrfs_block_group *bg)
> +{
> +	struct btrfs_fs_info *fs_info = bg->fs_info;
> +
> +	spin_lock(&fs_info->relocation_bg_lock);
> +	if (fs_info->data_reloc_bg == bg->start)
> +		fs_info->data_reloc_bg = 0;
> +	spin_unlock(&fs_info->relocation_bg_lock);
> +}

This does not look like it's important enough to be static inline.

  parent reply	other threads:[~2021-09-07 11:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 14:44 [PATCH 0/6] btrfs: zoned: unify relocation on a zoned and regular FS Johannes Thumshirn
2021-09-03 14:44 ` [PATCH 1/6] btrfs: introduce btrfs_is_data_reloc_root Johannes Thumshirn
2021-09-07 11:36   ` Naohiro Aota
2021-09-03 14:44 ` [PATCH 2/6] btrfs: zoned: add a dedicated data relocation block group Johannes Thumshirn
2021-09-07 11:37   ` Naohiro Aota
2021-09-07 11:52   ` David Sterba [this message]
2021-09-07 12:43   ` David Sterba
2021-09-03 14:44 ` [PATCH 3/6] btrfs: zoned: use regular writes for relocation Johannes Thumshirn
2021-09-07 11:39   ` Naohiro Aota
2021-09-03 14:44 ` [PATCH 4/6] btrfs: check for relocation inodes on zoned btrfs in should_nocow Johannes Thumshirn
2021-09-07 11:40   ` Naohiro Aota
2021-09-03 14:44 ` [PATCH 5/6] btrfs: zoned: allow preallocation for relocation inodes Johannes Thumshirn
2021-09-03 14:44 ` [PATCH 6/6] btrfs: rename setup_extent_mapping in relocation code Johannes Thumshirn

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=20210907115207.GL3379@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=damien.lemoal@wdc.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=naohiro.aota@wdc.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).