All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/4] btrfs-progs: check: Repair invalid inode mode in subvolume trees
Date: Tue,  3 Sep 2019 16:24:03 +0800	[thread overview]
Message-ID: <20190903082407.13927-1-wqu@suse.com> (raw)

Before this patch, btrfs check can only repair bad free space cache
inode mode (as it was the first case detected by tree-checker and reported)

But now what may happen finally happened, we have user reorting bad
inode mode in subvolumes trees.

Although the reported get the fs fixed by removing the offending old
files, it's still a bad thing that "btrfs check" can't fix it.

This patch will bring the repair functionality to all inodes, along with
needed test image.

Qu Wenruo (4):
  btrfs-progs: check/common: Make repair_imode_common() to handle inodes
    in subvolume trees
  btrfs-progs: check/lowmem: Repair bad imode early
  btrfs-progs: check/original: Fix inode mode in subvolume trees
  btrfs-progs: tests/fsck: Add new images for inode mode repair
    functionality

 check/main.c                                  |  32 ++++--
 check/mode-common.c                           |  96 +++++++++++++++---
 check/mode-common.h                           |   2 +
 check/mode-lowmem.c                           |  39 +++++++
 .../039-bad-inode-mode/.lowmem_repairable     |   0
 .../bad_free_space_cache_imode.raw.xz}        | Bin
 .../bad_regular_file_imode.img.xz             | Bin 0 -> 2060 bytes
 7 files changed, 147 insertions(+), 22 deletions(-)
 create mode 100644 tests/fsck-tests/039-bad-inode-mode/.lowmem_repairable
 rename tests/fsck-tests/{039-bad-free-space-cache-inode-mode/test.raw.xz => 039-bad-inode-mode/bad_free_space_cache_imode.raw.xz} (100%)
 create mode 100644 tests/fsck-tests/039-bad-inode-mode/bad_regular_file_imode.img.xz

-- 
2.23.0


             reply	other threads:[~2019-09-03  8:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-03  8:24 Qu Wenruo [this message]
2019-09-03  8:24 ` [PATCH 1/4] btrfs-progs: check/common: Make repair_imode_common() to handle inodes in subvolume trees Qu Wenruo
2019-09-04  7:37   ` Nikolay Borisov
2019-09-04  8:30     ` Qu Wenruo
2019-09-04 10:53       ` Nikolay Borisov
2019-09-04 12:12         ` Qu Wenruo
2019-09-03  8:24 ` [PATCH 2/4] btrfs-progs: check/lowmem: Repair bad imode early Qu Wenruo
2019-09-03  8:24 ` [PATCH 3/4] btrfs-progs: check/original: Fix inode mode in subvolume trees Qu Wenruo
2019-09-03  8:24 ` [PATCH 4/4] btrfs-progs: tests/fsck: Add new images for inode mode repair functionality 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=20190903082407.13927-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 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.