All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org, dsterba@suse.cz
Cc: chandan@linux.vnet.ibm.com
Subject: [PATCH 0/3] Convert rollback rework and test enhancement
Date: Tue, 13 Dec 2016 17:44:12 +0800	[thread overview]
Message-ID: <20161213094415.30912-1-quwenruo@cn.fujitsu.com> (raw)

Current convert rollback condition is too restrict for new convert
behavior, and has several problems.

1) Can't rollback new convert image with new data chunk
Chunk level check can't handle newly allocated data chunk, which is not
1:1 mapped but completely valid in new behavior.
The last patch will enhance the test case to handle it.

2) Can't rollback real no-hole image
Since it assumes hole file extent as requirement.
And due to the possibility to enable no_holes halfway, btrfsck won't
report such error, since it's acceptable.

3) Too complex logical, and RW btrfs tree operations
In fact, considering how small data we need to rewrite (1M + 128K), we
don't really need to open btrfs read-write.
Just copy needed data and re-fill. Simple and easy.

Thanks Chandan, his report on failure of rollback leads to this rework.

Qu Wenruo (3):
  btrfs-progs: file-item: Fix wrong file extents inserted
  btrfs-progs: convert: Rework rollback to handle new convert image
  btrfs-progs: convert-test: trigger chunk allocation after convert

 convert/main.c       | 693 ++++++++++++++++++++-------------------------------
 file-item.c          |  11 +
 tests/common         |   4 +
 tests/common.convert |   3 +
 4 files changed, 285 insertions(+), 426 deletions(-)

-- 
2.10.2




             reply	other threads:[~2016-12-13  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13  9:44 Qu Wenruo [this message]
2016-12-13  9:44 ` [PATCH 1/3] btrfs-progs: file-item: Fix wrong file extents inserted Qu Wenruo
2016-12-13  9:44 ` [PATCH 2/3] btrfs-progs: convert: Rework rollback to handle new convert image Qu Wenruo
2016-12-13  9:44 ` [PATCH 3/3] btrfs-progs: convert-test: trigger chunk allocation after convert Qu Wenruo
2016-12-13 23:51   ` Tsutomu Itoh
2016-12-14  0:52     ` 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=20161213094415.30912-1-quwenruo@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=chandan@linux.vnet.ibm.com \
    --cc=dsterba@suse.cz \
    --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 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.