linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v2 00/11] btrfs: extent tree v2, support for global roots
Date: Wed, 26 Jan 2022 16:52:14 +0100	[thread overview]
Message-ID: <20220126155214.GZ14046@twin.jikos.cz> (raw)
In-Reply-To: <6ac1b7c7-b775-a48e-f84b-9feced206b77@suse.com>

On Wed, Jan 12, 2022 at 05:09:15PM +0200, Nikolay Borisov wrote:
> Overall this is a low-risk series and generally looks LGTM. I have a
> couple of points which apply too all patches and I'm gonna list them here:
> 
> 1. This is minor but might be a bit more informative - instead of
> returning -EINVAL when an operation which is forbidden returning
> -EOPNOTSUPP is closer to what is actually meant. ANd not that something
> is invalid per-se. This is a minor point given for now this is purely a
> developer feature.

Makes sense to use EOPNOTSUPP.

> 2. The extent tree would be in development for quite some time, perhaps
> at least 3-4 release if not more, during that time the code will be
> sprinkled with the checks for the forbidden ops and even everyone will
> be paying the (arguably small cost) of having them in the code. My point
> is can't those compatibility checks be also gated behind
> CONFIG_BTRFS_DEBUG? Eventually they will be removed but until this time
> comes we'll have them in the respective call paths.

That's a good point, we could make it compile-time condition with some
magic that should remove any cost of the checks. Something like

	if (EXTENT_V2_ENABLED(fs_info)) {
		...
	}

where the macro is

#ifdef CONFIG_BTRFS_DEBUG
#define EXTENT_V2_ENABLED(fs_info) 	btrfs_incompat(fs_info, EXTENT_TREE_V2)
#else
#define EXTENT_V2_ENABLED(fs_info)	false
#endif

  reply	other threads:[~2022-01-26 15:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 20:39 [PATCH v2 00/11] btrfs: extent tree v2, support for global roots Josef Bacik
2021-12-15 20:39 ` [PATCH v2 01/11] btrfs: add definition for EXTENT_TREE_V2 Josef Bacik
2021-12-15 20:39 ` [PATCH v2 02/11] btrfs: disable balance for extent tree v2 for now Josef Bacik
2021-12-15 20:40 ` [PATCH v2 03/11] btrfs: disable device manipulation ioctl's EXTENT_TREE_V2 Josef Bacik
2021-12-15 20:40 ` [PATCH v2 04/11] btrfs: disable qgroups in extent tree v2 Josef Bacik
2021-12-15 20:40 ` [PATCH v2 05/11] btrfs: disable scrub for extent-tree-v2 Josef Bacik
2021-12-15 20:40 ` [PATCH v2 06/11] btrfs: disable snapshot creation/deletion for extent tree v2 Josef Bacik
2021-12-15 20:40 ` [PATCH v2 07/11] btrfs: disable space cache related mount options " Josef Bacik
2021-12-15 20:40 ` [PATCH v2 08/11] btrfs: tree-checker: don't fail on empty extent roots " Josef Bacik
2021-12-15 20:40 ` [PATCH v2 09/11] btrfs: abstract out loading the tree root Josef Bacik
2022-01-13  9:20   ` Nikolay Borisov
2022-01-26 15:32     ` David Sterba
2021-12-15 20:40 ` [PATCH v2 10/11] btrfs: add code to support the block group root Josef Bacik
2022-01-12 15:16   ` Nikolay Borisov
2022-01-26 15:34     ` David Sterba
2022-01-26 15:58       ` Nikolay Borisov
2021-12-15 20:40 ` [PATCH v2 11/11] btrfs: add support for multiple global roots Josef Bacik
2022-01-12 15:09 ` [PATCH v2 00/11] btrfs: extent tree v2, support for " Nikolay Borisov
2022-01-26 15:52   ` David Sterba [this message]
2022-01-26 15:54 ` 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=20220126155214.GZ14046@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.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).