Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Cc: Martin Doucha <martin.doucha@suse.com>,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH v5 1/3] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation
Date: Wed, 24 Jun 2020 16:22:36 +0800	[thread overview]
Message-ID: <3a799f24-491a-a495-349a-334c59d7eb2d@oracle.com> (raw)
In-Reply-To: <20200623232352.668681-2-wqu@suse.com>

Looks good.
Just a nit below.
Reviewed-by: Anand Jain <anand.jain@oracle.com>

> +	if (ret) {
> +		if (!only_release_metadata)
> +			btrfs_delalloc_release_space(inode, data_reserved,
> +					block_start, blocksize, true);
> +		else
> +			btrfs_delalloc_release_metadata(BTRFS_I(inode),
> +					blocksize, true);
> +	}

Nit: (May be it can be fixed during integration so no need to send 
another revision.) here the ! operation inside if can be removed.

if (only_release_metadata)
    btrfs_delalloc_release_metadata()
else
    btrfs_delalloc_release_space()

Thanks, Anand

  reply	other threads:[~2020-06-24  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 23:23 [PATCH v5 0/3] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation Qu Wenruo
2020-06-23 23:23 ` [PATCH v5 1/3] " Qu Wenruo
2020-06-24  8:22   ` Anand Jain [this message]
2020-06-23 23:23 ` [PATCH v5 2/3] btrfs: add comments for btrfs_check_can_nocow() and can_nocow_extent() Qu Wenruo
2020-06-23 23:23 ` [PATCH v5 3/3] btrfs: refactor btrfs_check_can_nocow() into two variants Qu Wenruo
2020-06-24  4:38   ` Anand Jain
2020-06-26 15:37   ` 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=3a799f24-491a-a495-349a-334c59d7eb2d@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fdmanana@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=martin.doucha@suse.com \
    --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