linux/fs/btrfs
Arne Jansen a2de733c78 btrfs: scrub
This adds an initial implementation for scrub. It works quite
straightforward. The usermode issues an ioctl for each device in the
fs. For each device, it enumerates the allocated device chunks. For
each chunk, the contained extents are enumerated and the data checksums
fetched. The extents are read sequentially and the checksums verified.
If an error occurs (checksum or EIO), a good copy is searched for. If
one is found, the bad copy will be rewritten.
All enumerations happen from the commit roots. During a transaction
commit, the scrubs get paused and afterwards continue from the new
roots.

This commit is based on the series originally posted to linux-btrfs
with some improvements that resulted from comments from David Sterba,
Ilya Dryomov and Jan Schmidt.

Signed-off-by: Arne Jansen <sensille@gmx.net>
2011-05-12 14:45:20 +02:00
..
Kconfig btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
Makefile btrfs: scrub 2011-05-12 14:45:20 +02:00
acl.c Btrfs: Check validity before setting an acl 2011-04-13 14:25:35 +08:00
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING 2010-05-25 10:34:58 -04:00
async-thread.h Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
btrfs_inode.h Btrfs: change reserved_extents to an atomic_t 2011-03-17 14:21:18 -04:00
compat.h Btrfs: drop remaining LINUX_KERNEL_VERSION checks and compat code 2009-01-06 09:38:55 -05:00
compression.c Btrfs: check return value of btrfs_alloc_path() 2011-03-28 05:37:54 -04:00
compression.h btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00
ctree.c Btrfs: check return value of read_tree_block() 2011-03-28 05:37:37 -04:00
ctree.h btrfs: scrub 2011-05-12 14:45:20 +02:00
delayed-ref.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
delayed-ref.h Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
dir-item.c Btrfs: check return value of btrfs_alloc_path() 2011-03-28 05:37:54 -04:00
disk-io.c btrfs: scrub 2011-05-12 14:45:20 +02:00
disk-io.h Btrfs: forced readonly mounts on errors 2011-01-17 15:13:08 -05:00
export.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2011-02-07 14:06:18 -08:00
export.h NFS support for btrfs - v3 2008-09-25 11:04:06 -04:00
extent-tree.c Btrfs: check return value of kmalloc() 2011-04-25 19:43:52 -04:00
extent_io.c btrfs: fix wrong allocating flag when reading page 2011-04-25 19:43:51 -04:00
extent_io.h btrfs: using cached extent_state in set/unlock combinations 2011-04-11 20:45:36 -04:00
extent_map.c Btrfs: check return value of alloc_extent_map() 2011-02-14 16:21:37 -05:00
extent_map.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
file-item.c btrfs: scrub 2011-05-12 14:45:20 +02:00
file.c Btrfs: deal with the case that we run out of space in the cache 2011-04-08 13:00:27 -04:00
free-space-cache.c Btrfs: free bitmaps properly when evicting the cache 2011-04-25 19:43:52 -04:00
free-space-cache.h Btrfs: add btrfs_trim_fs() to handle FITRIM 2011-03-28 05:37:47 -04:00
hash.h Btrfs: remove crc32c.h and use libcrc32c directly. 2009-06-10 11:29:53 -04:00
inode-item.c Btrfs: Integrate metadata reservation with start_transaction 2010-05-25 10:34:50 -04:00
inode-map.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
inode.c btrfs: scrub 2011-05-12 14:45:20 +02:00
ioctl.c fix user annotation in ioctl.c 2011-04-11 20:25:46 -04:00
ioctl.h btrfs: scrub 2011-05-12 14:45:20 +02:00
locking.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
locking.h Btrfs: fix spinlock assertions on UP systems 2009-03-09 11:45:38 -04:00
lzo.c Btrfs: Avoid accessing unmapped kernel address 2011-02-16 15:37:58 -05:00
ordered-data.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ordered-data.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
orphan.c Btrfs: fixup return code for btrfs_del_orphan_item 2010-12-09 13:57:15 -05:00
print-tree.c btrfs: fix missing break in switch phrase 2011-01-28 16:40:37 -05:00
print-tree.h Btrfs: Create extent_buffer interface for large blocksizes 2008-09-25 11:03:56 -04:00
ref-cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ref-cache.h Btrfs: use RB_ROOT to intialize rb_trees instead of setting rb_node to NULL 2010-03-08 16:26:50 -05:00
relocation.c btrfs: scrub 2011-05-12 14:45:20 +02:00
root-tree.c Btrfs: Fix uninitialized root flags for subvolumes 2011-04-05 01:20:24 -04:00
scrub.c btrfs: scrub 2011-05-12 14:45:20 +02:00
struct-funcs.c Btrfs: Fix checkpatch.pl warnings 2009-01-05 21:25:51 -05:00
super.c Btrfs: fix subvolume mount by name problem when default mount subvolume is set 2011-04-11 20:26:50 -04:00
sysfs.c Driver core: Constify struct sysfs_ops in struct kobj_type 2010-03-07 17:04:49 -08:00
transaction.c btrfs: scrub 2011-05-12 14:45:20 +02:00
transaction.h Btrfs: avoid taking the trans_mutex in btrfs_end_transaction 2011-04-11 20:43:52 -04:00
tree-defrag.c Btrfs: cleanup warnings from gcc 4.6 (nonbugs) 2010-10-29 15:14:37 -04:00
tree-log.c btrfs: scrub 2011-05-12 14:45:20 +02:00
tree-log.h Btrfs: Metadata ENOSPC handling for tree log 2010-05-25 10:34:53 -04:00
version.h Update Btrfs files for in-kernel usage 2008-09-25 15:41:59 -04:00
version.sh Btrfs: Fixes for 2.6.28-rc API changes 2008-11-19 21:17:22 -05:00
volumes.c btrfs: scrub 2011-05-12 14:45:20 +02:00
volumes.h btrfs: scrub 2011-05-12 14:45:20 +02:00
xattr.c Btrfs: Check if btrfs_next_leaf() returns error in btrfs_listxattr() 2011-04-13 14:25:28 +08:00
xattr.h btrfs: constify xattr_handler 2010-05-21 18:31:18 -04:00
zlib.c btrfs: Extract duplicate decompress code 2010-12-22 23:15:50 +08:00