All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
@ 2011-09-01 14:52 Jan Schmidt
  2011-09-01 14:52 ` [PATCH v9 1/8] btrfs: added helper functions to iterate backrefs Jan Schmidt
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jan Schmidt @ 2011-09-01 14:52 UTC (permalink / raw)
  To: chris.mason, linux-btrfs

Changelog v8->v9:
- bugfix: increment extent buffer's ref-count so it can safely be used after
  releasing the path (reported by myself)
- fixed function comment for paths_from_inode()

This patch set with the recent fixes just mentioned is also available from the
scrub branch of my repository:

git://git.jan-o-sch.net/btrfs-unstable

The for-chris branch (which is the combination of scrub and raid1-repair) has
those updates, too.

Original message follows:
------------------------
This patch set introduces two new features for scrub. They share the backref
iteration code which is the reason they made it into the same patch set.

The first feature adds printk statements in case scrub finds an error which list
all affected files. You will need patch 1, 2 and 3 for that.

The second feature adds the trigger which enables us to correct i/o errors in
case the affected extent does not have a checksum (nodatasum), eventually. You
will need patch 1, 4, 5 and 6 for that.

I tried to apply all patches to the current cmason/for-linus branch and to
Arne's current for-chris branch. They do apply with no errors (some offsets
possible).

The new ioctl()s can be tested from usermode by applying the patch series
	[PATCH v2 0/3] Btrfs-progs: add the first "inspect-internal" commands
from this mailing list to the user land tools.

Please review.

Next I'm starting to make up my mind how to implement on-the-fly error
correction correctly. This will enable us to rewrite good data whenever we
encounter a bad copy. I have some preliminary patches already, the stress in the
first sentence is on "correctly". The second feature mentioned in this patch
series will then automatically use that code, too.

Changelog v1->v2:
- Various cleanup, sensible error codes as suggested by David Sterba

Changelog v2->v3:
- evaluation and iteration of shared refs
- support for in-tree refs (v2 iterated inline refs only)
- never call an interator function without releasing the path
- iterate_irefs now returns -ENOENT in case no refs are found
- some stupid bugs removed where release_path was called too early
- ioctls added to provide new functions to user mode
- bugfixes for cases where search_slot found the very end of a leaf
- bugfix: use right fs root for readpage instead of fs_root->fs_info
- based on current cmason/for-linus

Changelog v3->v4:
- fixed a regression with mirror_num that could prevent error correction
- based on current cmason/for-linus

Changelog v4->v5:
- fixed a deadlock when fixup is taking longer while scrub is about to end

Changelog v5->v6:
- fixed ioctl priviledge and input sanity checking (reported by Andi Kleen)

Changelog v6->v7:
- include everything that was stated to be in v6

Changelog v7->v8:
- bugfix for the case where refs exist but none are inline (reported by Jan
  Schubert)
- use bytes_missing and bytes_left (unsigned) instead of size (signed) (wished
  by Chris Mason)
- alloc_bytes is now size_t (reported by Li Zefan)

Please try it and report errors (or confirm there are none, of course). I can
provide a place to pull from if anyone likes.

-Jan


Jan Schmidt (8):
  btrfs: added helper functions to iterate backrefs
  btrfs scrub: added unverified_errors
  btrfs scrub: print paths of corrupted files
  btrfs scrub: bugfix: mirror_num off by one
  btrfs: add mirror_num to extent_read_full_page
  btrfs scrub: use int for mirror_num, not u64
  btrfs scrub: add fixup code for errors on nodatasum files
  btrfs: new ioctls to do logical->inode and inode->path resolving

 fs/btrfs/Makefile    |    3 +-
 fs/btrfs/backref.c   |  776 ++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/backref.h   |   62 ++++
 fs/btrfs/disk-io.c   |    2 +-
 fs/btrfs/extent_io.c |    6 +-
 fs/btrfs/extent_io.h |    3 +-
 fs/btrfs/inode.c     |    2 +-
 fs/btrfs/ioctl.c     |  143 +++++++++
 fs/btrfs/ioctl.h     |   30 ++
 fs/btrfs/scrub.c     |  414 +++++++++++++++++++++++++---
 10 files changed, 1401 insertions(+), 40 deletions(-)
 create mode 100644 fs/btrfs/backref.c
 create mode 100644 fs/btrfs/backref.h

-- 
1.7.3.4


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

end of thread, other threads:[~2011-09-01 14:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 14:52 [PATCH v9 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 1/8] btrfs: added helper functions to iterate backrefs Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 2/8] btrfs scrub: added unverified_errors Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 3/8] btrfs scrub: print paths of corrupted files Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 4/8] btrfs scrub: bugfix: mirror_num off by one Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 5/8] btrfs: add mirror_num to extent_read_full_page Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 6/8] btrfs scrub: use int for mirror_num, not u64 Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 7/8] btrfs scrub: add fixup code for errors on nodatasum files Jan Schmidt
2011-09-01 14:52 ` [PATCH v9 8/8] btrfs: new ioctls to do logical->inode and inode->path resolving Jan Schmidt

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.