linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Nikolay Borisov <nborisov@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/6] btrfs: Export qgroup_reserve_meta
Date: Tue, 23 Feb 2021 07:42:48 +0800	[thread overview]
Message-ID: <c5936976-95af-b937-dbb8-6545bca70792@gmx.com> (raw)
In-Reply-To: <20210222164047.978768-3-nborisov@suse.com>



On 2021/2/23 上午12:40, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>

Considering how small the export is, I prefer this to be merged with
next patch, as it's much easier to understand why we want to export the
function.

And since it will be exported, may be it's a good idea to rename it as
btrfs_qgroup_reserve_meta_atomic() or btrfs_qgroup_reserve_meta_noflush()?

Thanks,
Qu
> ---
>   fs/btrfs/qgroup.c | 4 ++--
>   fs/btrfs/qgroup.h | 3 +++
>   2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
> index 808370ada888..fbef95bc3557 100644
> --- a/fs/btrfs/qgroup.c
> +++ b/fs/btrfs/qgroup.c
> @@ -3841,8 +3841,8 @@ static int sub_root_meta_rsv(struct btrfs_root *root, int num_bytes,
>   	return num_bytes;
>   }
>
> -static int qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
> -				enum btrfs_qgroup_rsv_type type, bool enforce)
> +int qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
> +			enum btrfs_qgroup_rsv_type type, bool enforce)
>   {
>   	struct btrfs_fs_info *fs_info = root->fs_info;
>   	int ret;
> diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h
> index 50dea9a2d8fb..c1a3cc15dede 100644
> --- a/fs/btrfs/qgroup.h
> +++ b/fs/btrfs/qgroup.h
> @@ -354,6 +354,9 @@ int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
>   			       u64 rfer, u64 excl);
>   #endif
>
> +int qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
> +			enum btrfs_qgroup_rsv_type type, bool enforce);
> +
>   /* New io_tree based accurate qgroup reserve API */
>   int btrfs_qgroup_reserve_data(struct btrfs_inode *inode,
>   			struct extent_changeset **reserved, u64 start, u64 len);
>

  reply	other threads:[~2021-02-22 23:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 16:40 [PATCH 0/6] Qgroup/delayed node related fixes Nikolay Borisov
2021-02-22 16:40 ` [PATCH 1/6] btrfs: Free correct amount of space in btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-02-22 23:41   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 2/6] btrfs: Export qgroup_reserve_meta Nikolay Borisov
2021-02-22 23:42   ` Qu Wenruo [this message]
2021-02-25 16:27     ` David Sterba
2021-02-22 16:40 ` [PATCH 3/6] btrfs: Don't flush from btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-02-22 23:45   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 4/6] btrfs: Cleanup try_flush_qgroup Nikolay Borisov
2021-02-22 23:46   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 5/6] btrfs: Remove btrfs_inode from btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-02-22 23:53   ` Qu Wenruo
2021-02-22 16:40 ` [PATCH 6/6] btrfs: Simplify code flow in btrfs_delayed_inode_reserve_metadata Nikolay Borisov
2021-03-01 16:15   ` David Sterba
2021-03-01 16:20     ` Nikolay Borisov
2021-03-01 18:54       ` David Sterba
2021-03-01 18:55 ` [PATCH 0/6] Qgroup/delayed node related fixes 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=c5936976-95af-b937-dbb8-6545bca70792@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@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).