Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/6] Overhaul free objectid code
Date: Tue, 15 Dec 2020 18:08:23 +0100	[thread overview]
Message-ID: <20201215170823.GY6430@twin.jikos.cz> (raw)
In-Reply-To: <20201207153237.1073887-1-nborisov@suse.com>

On Mon, Dec 07, 2020 at 05:32:31PM +0200, Nikolay Borisov wrote:
> This series aims to make the free objectid code more straighforward. Currently
> the highest used objectid is used which implies that when btrfs_get_free_objectid
> is called the pre-increment operator is used. At the same time when looking
> at how highest_objectid is initialised in find_free_objectid it's using the,
> at first looko unusual, 'BTRFS_FREE_OBJECTID - 1'. Furthermore btrfs_find_free_objectid
> is badly named as it's used only in initializaion context.
> 
> With the series applied the following is achieved:
>  * The 2 functions related to free objectid have better naming which describes
>  their semantic meaning.
> 
>  * highest_objectid is renamed to free_objectid which clearly states what it's
>  supposed to hold, also btrfs_get_free_objectid now returns the value and
>  does a post-increment which seems more logical than the previous cod.
> 
>  * Now it's not necessary to re-initialize free_objectid in create_subvol
>  since that member is now consistently initialized when a given root is read
>  for the first time in btrfs_init_fs_root->btrfs_init_root_free_objectid.
>  Additionally in btrfs_init_root_free_objectid free_objectid is now initialized
>  to BTRFS_FIRST_FREE_OBJECTID so it's self-explanatory.
> 
> This series survived xfstest as well as a new xfstest which verifies precisely
> this functionality.
> 
> 
> Nikolay Borisov (6):
>   btrfs: Rename btrfs_find_highest_objectid to
>     btrfs_init_root_free_objectid
>   btrfs: Rename btrfs_find_free_objectid to btrfs_get_free_objectid
>   btrfs: Remove useless ASSERTS
>   btrfs: Rename highest_objectid to free_objectid
>   btrfs: Make free_objectid hold the next available objectid in the root
>   btrfs: Remove new_dirid argument from btrfs_create_subvol_root

Except patch 3 (the assert) added to misc-next, thanks.

      parent reply	other threads:[~2020-12-15 17:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 15:32 [PATCH 0/6] Overhaul free objectid code Nikolay Borisov
2020-12-07 15:32 ` [PATCH 1/6] btrfs: Rename btrfs_find_highest_objectid to btrfs_init_root_free_objectid Nikolay Borisov
2020-12-07 15:32 ` [PATCH 2/6] btrfs: Rename btrfs_find_free_objectid to btrfs_get_free_objectid Nikolay Borisov
2020-12-07 15:32 ` [PATCH 3/6] btrfs: Remove useless ASSERTS Nikolay Borisov
2020-12-15 16:58   ` David Sterba
2020-12-15 17:48     ` Nikolay Borisov
2020-12-18 15:03       ` David Sterba
2020-12-07 15:32 ` [PATCH 4/6] btrfs: Rename highest_objectid to free_objectid Nikolay Borisov
2020-12-07 15:32 ` [PATCH 5/6] btrfs: Make free_objectid hold the next available objectid in the root Nikolay Borisov
2020-12-07 15:32 ` [PATCH 6/6] btrfs: Remove new_dirid argument from btrfs_create_subvol_root Nikolay Borisov
2020-12-07 16:19 ` [RESEND PATCH] btrfs: Add test 154 Nikolay Borisov
2020-12-20 14:32   ` Eryu Guan
2020-12-07 16:27 ` [PATCH 0/6] Overhaul free objectid code Josef Bacik
2020-12-15 17:08 ` David Sterba [this message]

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=20201215170823.GY6430@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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