diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-17 18:54:15 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 17:04:04 +0200 |
commit | ba1da2f442ec91a1534afa893f9bef7e33056ace (patch) | |
tree | bc567aa83da6d709d3762f7e0bf9a5fe4d16de11 /fs/btrfs/ordered-data.h | |
parent | btrfs_start_transaction: wait for commits in progress to finish (diff) | |
download | linux-ba1da2f442ec91a1534afa893f9bef7e33056ace.tar.xz linux-ba1da2f442ec91a1534afa893f9bef7e33056ace.zip |
Btrfs: Don't pin pages in ram until the entire ordered extent is on disk.
Checksum items are not inserted until the entire ordered extent is on disk,
but individual pages might be clean and available for reclaim long before
the whole extent is on disk.
In order to allow those pages to be freed, we need to be able to search
the list of ordered extents to find the checksum that is going to be inserted
in the tree. This way if the page needs to be read back in before
the checksums are in the btree, we'll be able to verify the checksum on
the page.
This commit adds the ability to search the pending ordered extents for
a given offset in the file, and changes btrfs_releasepage to allow
ordered pages to be freed.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ordered-data.h')
-rw-r--r-- | fs/btrfs/ordered-data.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h index 40e9126ad954..33f0d9e91b11 100644 --- a/fs/btrfs/ordered-data.h +++ b/fs/btrfs/ordered-data.h @@ -91,4 +91,5 @@ int btrfs_add_ordered_pending(struct inode *inode, u64 start, u64 len); int btrfs_ordered_update_i_size(struct inode *inode, struct btrfs_ordered_extent *ordered); +int btrfs_find_ordered_sum(struct inode *inode, u64 offset, u32 *sum); #endif |