mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
Btrfs: Do metadata checksums for reads via a workqueue
Before, metadata checksumming was done by the callers of read_tree_block, which would set EXTENT_CSUM bits in the extent tree to show that a given range of pages was already checksummed and didn't need to be verified again. But, those bits could go away via try_to_releasepage, and the end result was bogus checksum failures on pages that never left the cache. The new code validates checksums when the page is read. It is a little tricky because metadata blocks can span pages and a single read may end up going via multiple bios. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
728131d8e4
commit
ce9adaa5a7
7 changed files with 310 additions and 67 deletions
|
@ -485,6 +485,10 @@ struct btrfs_fs_info {
|
|||
struct list_head trans_list;
|
||||
struct list_head hashers;
|
||||
struct list_head dead_roots;
|
||||
struct list_head end_io_work_list;
|
||||
struct work_struct end_io_work;
|
||||
spinlock_t end_io_work_lock;
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,18)
|
||||
struct work_struct trans_work;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue