linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with
@ 2014-11-24  9:06 Qu Wenruo
  2014-11-24  9:07 ` [PATCH 1/6] btrfs-progs: print root dir verbose error in fsck Qu Wenruo
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Qu Wenruo @ 2014-11-24  9:06 UTC (permalink / raw)
  To: linux-btrfs

[SUMMARY]
Introduce the new 'lost+found' dir and related infrastructure to create it
in btrfs-progs.

[BUG]
With the new infrastructure, fix a bug that some people reported in both
kernel BZ and maillist, which there is some files' nlink is 1 but backref
points to non-exist parent.
The two reporters all report missing file(chrome config file), so we'd
better not to delete such files but use the 'lost+found' dir.

This bug is a kernel bug needing to be investigated, but the progs fix is
here before kernel fix.

[ROADMAP]
1. Fix the leaf corruption.
Currently, btrfs-progs can ignore corrupt leaf and continue
checking/reparing, however in that case, most problem can't be recovered
since its parent is missing(in corrupted leaf) and we were not able to
move them to someplace due to the missing of 'lost+found' dir.

With this patchset, there is a hope to fix such problems and I will
continue such work until we can fix most of most of the fs.

2. Unify the repair framework.
When writing the 6th patch, I think it is better to build a frame work
that unify the check and repair framework.
In 6th patch, my patchset and Josef's commit 2dc4c001 in fact has some
similar function but do the repair in different time and functions.

I will try to build a unified framework for repair, each repair will be
independent and have its own err number.
And each repair function should work like the following:
1) Check the error number
2) Do the repair
3) Update the related btrfsck record(like newly created inode, deleted inode)

Qu Wenruo (6):
  btrfs-progs: print root dir verbose error in fsck
  btrfs-progs: Import btrfs_insert/del/lookup_extref() functions.
  btrfs-progs: Import lookup/del_inode_ref() function.
  btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions.
  btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found' 
       fsck mechanism.
  btrfs-progs: Add fixing function for inodes whose nlink dismatch

 Makefile     |   2 +-
 cmds-check.c | 284 +++++++++++++++++++++++++++++++++++--
 ctree.c      |   6 +
 ctree.h      |  38 +++++
 inode-item.c | 318 +++++++++++++++++++++++++++++++++++++++++
 inode.c      | 453 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 1090 insertions(+), 11 deletions(-)
 create mode 100644 inode.c

-- 
2.1.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-11-26  0:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24  9:06 [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with Qu Wenruo
2014-11-24  9:07 ` [PATCH 1/6] btrfs-progs: print root dir verbose error in fsck Qu Wenruo
2014-11-24  9:07 ` [PATCH 2/6] btrfs-progs: Import btrfs_insert/del/lookup_extref() functions Qu Wenruo
2014-11-24  9:07 ` [PATCH 3/6] btrfs-progs: Import lookup/del_inode_ref() function Qu Wenruo
2014-11-24  9:07 ` [PATCH 4/6] btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions Qu Wenruo
2014-11-24  9:07 ` [PATCH 5/6] btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found' fsck mechanism Qu Wenruo
2014-11-24  9:07 ` [PATCH 6/6] btrfs-progs: Add fixing function for inodes whose nlink dismatch Qu Wenruo
2014-11-25 18:32 ` [PATCH 0/6] btrfs-progs: New 'lost+found' infrastructrue with David Sterba
2014-11-26  0:48   ` Qu Wenruo

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).