All of lore.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org, kernel-team@fb.com,
	Chris Mason <clm@fb.com>, Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH v2 10/12] Btrfs: get rid of btrfs_orphan_commit_root() and root->orphan_inodes
Date: Fri, 11 May 2018 00:05:33 -0700	[thread overview]
Message-ID: <20180511070533.GC30748@vader> (raw)
In-Reply-To: <946921a1-900f-cd2b-8f83-ad6ee853675a@suse.com>

On Fri, May 11, 2018 at 10:01:34AM +0300, Nikolay Borisov wrote:
> 
> 
> On 11.05.2018 03:11, Omar Sandoval wrote:
> > From: Omar Sandoval <osandov@fb.com>
> > 
> > btrfs_orphan_commit_root() tries to delete an orphan item for a
> > subvolume in the tree root, but we don't actually insert that item in
> > the first place. See commit 0a0d4415e338 ("Btrfs: delete dead code in
> > btrfs_orphan_add()"). We can get rid of it.
> > 
> > root->orphan_inodes was used to as a refcount for root->orphan_block_rsv
> > and for btrfs_orphan_commit_root(), but both are gone now, so we can get
> > rid of it, as well.
> 
> So this really means that the logic for orphaned root item is completely
> defunct. Perhaps:
> 
> a) This commit should be expanded to delete all the logic surrounding
> orphaned roots: btrfs_find_orphan_roots, BTRFS_ROOT_ORPHAN_ITEM_INSERTED
> flag define and any accompanying logic that utilizes this flag (end of
> btrfs_orphan_cleanup, orphan root logic at the end of btrfs_get_fs_root
> as well)
> 
> b) Have those changes in a separate patch

The root orphan handling is still necessary for subvolume deletion.

  reply	other threads:[~2018-05-11  7:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11  0:11 [PATCH v2 00/12] Btrfs: orphan and truncate fixes Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 01/12] Btrfs: remove stale comment referencing vmtruncate() Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 02/12] Btrfs: fix error handling in btrfs_truncate_inode_items() Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 03/12] Btrfs: don't BUG_ON() " Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 04/12] Btrfs: stop creating orphan items for truncate Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 05/12] Btrfs: don't release reserve or decrement orphan count if orphan item already existed Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 06/12] Btrfs: don't return ino to ino cache if inode item removal fails Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 07/12] Btrfs: refactor btrfs_evict_inode() reserve refill dance Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 08/12] Btrfs: fix ENOSPC caused by orphan items reservations Omar Sandoval
2018-05-11  6:38   ` Nikolay Borisov
2018-05-11  6:51     ` Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 09/12] Btrfs: get rid of root->orphan_block_rsv and root->orphan_lock Omar Sandoval
2018-05-11  6:44   ` Nikolay Borisov
2018-05-11  6:48     ` Omar Sandoval
2018-05-11  7:20       ` Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 10/12] Btrfs: get rid of btrfs_orphan_commit_root() and root->orphan_inodes Omar Sandoval
2018-05-11  7:01   ` Nikolay Borisov
2018-05-11  7:05     ` Omar Sandoval [this message]
2018-05-11  0:11 ` [PATCH v2 11/12] Btrfs: simplify error handling in btrfs_evict_inode() Omar Sandoval
2018-05-11  0:11 ` [PATCH v2 12/12] Btrfs: reserve space for O_TMPFILE orphan item deletion Omar Sandoval

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=20180511070533.GC30748@vader \
    --to=osandov@osandov.com \
    --cc=clm@fb.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.