diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-02-20 12:07:25 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:00 -0400 |
commit | 065631f6dccea07bfad48d8981369f6d9cfd6e2b (patch) | |
tree | d9d5736f61d225d0418cf298092ac36fbe6099e2 /fs/btrfs/extent_io.h | |
parent | 0740c82bc7585a23e100c9a59d5e2abbf99459fb (diff) | |
download | kernel_samsung_tuna-065631f6dccea07bfad48d8981369f6d9cfd6e2b.tar.gz kernel_samsung_tuna-065631f6dccea07bfad48d8981369f6d9cfd6e2b.tar.bz2 kernel_samsung_tuna-065631f6dccea07bfad48d8981369f6d9cfd6e2b.zip |
Btrfs: checksum file data at bio submission time instead of during writepage
When we checkum file data during writepage, the checksumming is done one
page at a time, making it difficult to do bulk metadata modifications
to insert checksums for large ranges of the file at once.
This patch changes btrfs to checksum on a per-bio basis instead. The
bios are checksummed before they are handed off to the block layer, so
each bio is contiguous and only has pages from the same inode.
Checksumming on a bio basis allows us to insert and modify the file
checksum items in large groups. It also allows the checksumming to
be done more easily by async worker threads.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
-rw-r--r-- | fs/btrfs/extent_io.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index fcc4bb078c2..9d665466708 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -28,6 +28,7 @@ struct extent_state; struct extent_io_ops { int (*fill_delalloc)(struct inode *inode, u64 start, u64 end); int (*writepage_io_hook)(struct page *page, u64 start, u64 end); + int (*submit_bio_hook)(int rw, struct bio *bio); int (*readpage_io_hook)(struct page *page, u64 start, u64 end); int (*readpage_end_io_hook)(struct page *page, u64 start, u64 end, struct extent_state *state); |