linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: REF_COWS bit rework
Date: Thu, 14 May 2020 15:33:22 +0800	[thread overview]
Message-ID: <20200514073325.33343-1-wqu@suse.com> (raw)

This small patchset reworks the REF_COWS bit, by renaming it, and remove
that bit for data relocation root.


The basic idea of such rework is to reduce the confusion caused by the
name REF_COWS.

With the new bit called SHAREABLE, it should be clear that no user can
really create snapshot for data reloc tree, thus its tree blocks
shouldn't be shareable.

This would make data balance for reloc tree a little simpler.

Changelog:
v2:
- Add new patch to address the log tree check in
  btrfs_truncate_inode_items()
  Thanks for the advice from David, now it's much simpler than original
  check, and data reloc tree no longer needs extra hanlding

- Grab data reloc root in create_reloc_inode() and
  btrfs_recover_relocation()

- Comment update

Qu Wenruo (3):
  btrfs: Rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE
  btrfs: inode: Cleanup the log tree exceptions in
    btrfs_truncate_inode_items()
  btrfs: Don't set SHAREABLE flag for data reloc tree

 fs/btrfs/backref.c     |  4 ++--
 fs/btrfs/backref.h     |  2 +-
 fs/btrfs/block-rsv.c   |  2 +-
 fs/btrfs/ctree.c       | 26 +++++++++++++-------------
 fs/btrfs/ctree.h       | 25 +++++++++++++++++++++++--
 fs/btrfs/disk-io.c     | 27 ++++++++++++++++++++-------
 fs/btrfs/extent-tree.c |  2 +-
 fs/btrfs/file.c        |  2 +-
 fs/btrfs/inode.c       | 41 ++++++++++++++++++++++-------------------
 fs/btrfs/ioctl.c       |  2 +-
 fs/btrfs/relocation.c  | 41 +++++++++++++++++++----------------------
 fs/btrfs/transaction.c | 12 ++++++------
 fs/btrfs/tree-defrag.c |  2 +-
 13 files changed, 111 insertions(+), 77 deletions(-)

-- 
2.26.2


             reply	other threads:[~2020-05-14  7:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  7:33 Qu Wenruo [this message]
2020-05-14  7:33 ` [PATCH v2 1/3] btrfs: Rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE Qu Wenruo
2020-05-14  7:33 ` [PATCH v2 2/3] btrfs: inode: Cleanup the log tree exceptions in btrfs_truncate_inode_items() Qu Wenruo
2020-05-14 13:20   ` Filipe Manana
2020-05-14 13:32     ` Qu Wenruo
2020-05-14  7:33 ` [PATCH v2 3/3] btrfs: Don't set SHAREABLE flag for data reloc tree Qu Wenruo

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=20200514073325.33343-1-wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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).