linux/fs/btrfs
Chris Mason 89642229a5 Btrfs: Search data ordered extents first for checksums on read
Checksum items are not inserted into the tree until all of the io from a
given extent is complete.  This means one dirty page from an extent may
be written, freed, and then read again before the entire extent is on disk
and the checksum item is inserted.

The checksums themselves are stored in the ordered extent so they can
be inserted in bulk when IO is complete.  On read, if a checksum item isn't
found, the ordered extents were being searched for a checksum record.

This all worked most of the time, but the checksum insertion code tries
to reduce the number of tree operations by pre-inserting checksum items
based on i_size and a few other factors.  This means the read code might
find a checksum item that hasn't yet really been filled in.

This commit changes things to check the ordered extents first and only
dive into the btree if nothing was found.  This removes the need for
extra locking and is more reliable.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2008-09-25 11:04:05 -04:00
..
acl.c
async-thread.c Btrfs: Worker thread optimizations 2008-09-25 11:04:03 -04:00
async-thread.h Btrfs: Worker thread optimizations 2008-09-25 11:04:03 -04:00
bit-radix.c
bit-radix.h
btrfs_inode.h Add a per-inode lock around btrfs_drop_extents 2008-09-25 11:04:04 -04:00
compat.h Btrfs: Add workaround for AppArmor changing remove_suid() 2008-09-25 11:04:02 -04:00
COPYING
crc32c.h
ctree.c btrfs_next_leaf: do readahead when skip_locking is turned on 2008-09-25 11:04:04 -04:00
ctree.h Btrfs: alloc_mutex latency reduction 2008-09-25 11:04:05 -04:00
dir-item.c
disk-io.c Btrfs: Search data ordered extents first for checksums on read 2008-09-25 11:04:05 -04:00
disk-io.h Btrfs: Online btree defragmentation fixes 2008-09-25 11:04:04 -04:00
extent_io.c Btrfs: Search data ordered extents first for checksums on read 2008-09-25 11:04:05 -04:00
extent_io.h Btrfs: Fix some data=ordered related data corruptions 2008-09-25 11:04:05 -04:00
extent_map.c Btrfs: Fix some data=ordered related data corruptions 2008-09-25 11:04:05 -04:00
extent_map.h Btrfs: Fix some data=ordered related data corruptions 2008-09-25 11:04:05 -04:00
extent-tree.c Btrfs: alloc_mutex latency reduction 2008-09-25 11:04:05 -04:00
file-item.c Btrfs: Take the csum mutex while reading checksums 2008-09-25 11:04:05 -04:00
file.c Btrfs: Fix some data=ordered related data corruptions 2008-09-25 11:04:05 -04:00
hash.c
hash.h
inode-item.c
inode-map.c Btrfs: Replace the big fs_mutex with a collection of other locks 2008-09-25 11:04:03 -04:00
inode.c Btrfs: Search data ordered extents first for checksums on read 2008-09-25 11:04:05 -04:00
INSTALL
ioctl.c Btrfs: Add locking around volume management (device add/remove/balance) 2008-09-25 11:04:04 -04:00
ioctl.h Btrfs: transaction ioctls 2008-09-25 11:04:03 -04:00
locking.c Btrfs: Use mutex_lock_nested for tree locking 2008-09-25 11:04:05 -04:00
locking.h Btrfs: Start btree concurrency work. 2008-09-25 11:04:03 -04:00
Makefile Btrfs: Start btree concurrency work. 2008-09-25 11:04:03 -04:00
ordered-data.c Btrfs: Search data ordered extents first for checksums on read 2008-09-25 11:04:05 -04:00
ordered-data.h Btrfs: Fix 32 bit compiles by using an unsigned long byte count in the ordered extent 2008-09-25 11:04:05 -04:00
print-tree.c Btrfs: Pass down the expected generation number when reading tree blocks 2008-09-25 11:04:03 -04:00
print-tree.h
root-tree.c Btrfs: Fix deadlock while searching for dead roots on mount 2008-09-25 11:04:04 -04:00
struct-funcs.c
super.c Btrfs: Online btree defragmentation fixes 2008-09-25 11:04:04 -04:00
sysfs.c
TODO
transaction.c Btrfs: Take the csum mutex while reading checksums 2008-09-25 11:04:05 -04:00
transaction.h btrfs_start_transaction: wait for commits in progress to finish 2008-09-25 11:04:04 -04:00
tree-defrag.c Btrfs: Online btree defragmentation fixes 2008-09-25 11:04:04 -04:00
volumes.c Btrfs: Add locking around volume management (device add/remove/balance) 2008-09-25 11:04:04 -04:00
volumes.h Btrfs: Add async worker threads for pre and post IO checksumming 2008-09-25 11:04:03 -04:00
xattr.c Btrfs: Replace the big fs_mutex with a collection of other locks 2008-09-25 11:04:03 -04:00
xattr.h