From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/4] Fix for btrfs/156 failure and misc enhancements relocated to relocation
Date: Fri, 19 Jul 2019 14:51:40 +0800 [thread overview]
Message-ID: <20190719065144.15263-1-wqu@suse.com> (raw)
Btrfs/156 fails after commit 302167c50b32 ("btrfs: don't end the
transaction for delayed refs in throttle"), however it's not that
commit's fault.
The root cause is btrfs_can_relocate() can report false ENOSPC when
there is any block group freed in current transaction.
However thanks to all the hard work due to btrfs balance, we don't
really need some early ENOSPC check, as the current ENOSPC report at
extent reservation time is good enough for balance.
So the main fix is just to remove btrfs_can_relocate(), in patch 4.
Patch 1~3 are miscellaneous patches. Patch 1 unexport
find_free_dev_extent_start(), Patch 2 and 3 adds comment for possible
confusing behaviors, like find_free_dev_extent_start() only searches
commit root, and inc_block_group_ro() only cares if we have 1M free
space left, not caring if other block groups can contain the used space.
Any of the miscellaneous patches can be dropped if needed.
Changelog:
v2:
- Add supporting miscellaneous patches
- Commit message change for the main fix
* Directly explain how the ENOSPC is caused
* Add comment for what will happen if we really run out of space
Qu Wenruo (4):
btrfs: volumes: Unexport find_free_dev_extent_start()
btrfs: volumes: Add comment for find_free_dev_extent_start()
btrfs: extent-tree: Add comment for inc_block_group_ro()
btrfs: volumes: Remove ENOSPC-prone btrfs_can_relocate()
fs/btrfs/ctree.h | 1 -
fs/btrfs/extent-tree.c | 160 +++++------------------------------------
fs/btrfs/volumes.c | 15 ++--
fs/btrfs/volumes.h | 2 -
4 files changed, 28 insertions(+), 150 deletions(-)
--
2.22.0
next reply other threads:[~2019-07-19 6:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 6:51 Qu Wenruo [this message]
2019-07-19 6:51 ` [PATCH v2 1/4] btrfs: volumes: Unexport find_free_dev_extent_start() Qu Wenruo
2019-07-19 9:21 ` Johannes Thumshirn
2019-07-19 6:51 ` [PATCH v2 2/4] btrfs: volumes: Add comment for find_free_dev_extent_start() Qu Wenruo
2019-07-19 9:47 ` Johannes Thumshirn
2019-07-19 6:51 ` [PATCH v2 3/4] btrfs: extent-tree: Add comment for inc_block_group_ro() Qu Wenruo
2019-07-19 9:41 ` Johannes Thumshirn
2019-07-19 6:51 ` [PATCH v2 4/4] btrfs: volumes: Remove ENOSPC-prone btrfs_can_relocate() Qu Wenruo
2019-07-31 15:26 ` 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=20190719065144.15263-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).