From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 5/6] btrfs-progs: convert: Switch to new rollback function
Date: Tue, 20 Dec 2016 11:06:45 +0530 [thread overview]
Message-ID: <2378890.0M2mVh5Brl@localhost.localdomain> (raw)
In-Reply-To: <20161219065642.25078-6-quwenruo@cn.fujitsu.com>
On Monday, December 19, 2016 02:56:41 PM Qu Wenruo wrote:
> Since we have the whole facilities needed to rollback, switch to the new
> rollback.
>
> The new rollback function can handle the following things that old
> rollback either can't handle or just refuse to rollback:
>
> 1) New converted btrfs which allocates new data chunk
> This is due to the too restrict may_roll_back() condition, which is
> never a good friend for new convert behavior.
>
> The new rollback behavior fixes it by not checking data chunks, but
> only to check the file extents of the convert image file.
>
> If all file extents except the ones in reserved ranges, then we allow
> rollback.
>
> 2) New converted btrfs which enabled NO_HOLES feature
> Thanks to previous patches, we can convert to real NO_HOLES btrfs.
>
> And since old rollback assumes that file extents and holes covers the
> whole image file, it will fail due to the non-exists holes.
>
> Fix it by iterating file extents of convert image, and only compare
> the size we checked against file size if NO_HOLES is not enabled.
>
> And makes rollback function simpler:
>
> 1) Read-n-write vs extra chunk tree relocation
> Since converted btrfs only has 3 ranges that are not 1:1 mapped, just
> read this data out, and close btrfs, finally write them into position
> will be good enough, for both new convert and old convert.
> (To be more specific, old convert is just a subset of more universal
> new convert behavior)
>
> No extra work is needed any more, and we can even open the btrfs RO.
Thanks for fixing this. The patchset works fine on ppc64 and x86_64.
Tested-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
--
chandan
next prev parent reply other threads:[~2016-12-20 5:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 6:56 [PATCH v3 0/6] Convert rollback rework for v4.9 Qu Wenruo
2016-12-19 6:56 ` [PATCH v3 1/6] btrfs-progs: file-item: Fix wrong file extents inserted Qu Wenruo
2016-12-19 6:56 ` [PATCH v3 2/6] btrfs-progs: utils: Introduce basic set operations for range Qu Wenruo
2017-01-23 17:28 ` David Sterba
2017-01-24 0:40 ` Qu Wenruo
2017-01-23 17:40 ` David Sterba
2016-12-19 6:56 ` [PATCH v3 3/6] btrfs-progs: convert: Introduce function to record relocated ranges Qu Wenruo
2016-12-19 6:56 ` [PATCH v3 4/6] btrfs-progs: convert: Introduce new function to check if we can rollback Qu Wenruo
2016-12-19 6:56 ` [PATCH v3 5/6] btrfs-progs: convert: Switch to new rollback function Qu Wenruo
2016-12-20 5:36 ` Chandan Rajendra [this message]
2017-01-23 17:54 ` David Sterba
2017-01-24 0:44 ` Qu Wenruo
2017-01-24 16:37 ` David Sterba
2017-01-25 0:42 ` Qu Wenruo
2017-01-30 14:55 ` David Sterba
2016-12-19 6:56 ` [PATCH v3 6/6] btrfs-progs: convert-test: trigger chunk allocation after convert Qu Wenruo
2016-12-21 14:35 ` [PATCH v3 0/6] Convert rollback rework for v4.9 David Sterba
2016-12-22 1:53 ` 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=2378890.0M2mVh5Brl@localhost.localdomain \
--to=chandan@linux.vnet.ibm.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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).