diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-17 12:54:15 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:04 -0400 |
commit | ba1da2f442ec91a1534afa893f9bef7e33056ace (patch) | |
tree | bc567aa83da6d709d3762f7e0bf9a5fe4d16de11 /fs/btrfs/file.c | |
parent | f9295749388f82c8d2f485e99c72cd7c7876a99b (diff) |
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/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index d6505892cd52..3e4e5c227c0c 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -251,7 +251,7 @@ static int noinline dirty_and_release_pages(struct btrfs_trans_handle *trans, | |||
251 | end_of_last_block = start_pos + num_bytes - 1; | 251 | end_of_last_block = start_pos + num_bytes - 1; |
252 | 252 | ||
253 | lock_extent(io_tree, start_pos, end_of_last_block, GFP_NOFS); | 253 | lock_extent(io_tree, start_pos, end_of_last_block, GFP_NOFS); |
254 | trans = btrfs_join_transaction(root, 1); | 254 | trans = btrfs_start_transaction(root, 1); |
255 | if (!trans) { | 255 | if (!trans) { |
256 | err = -ENOMEM; | 256 | err = -ENOMEM; |
257 | goto out_unlock; | 257 | goto out_unlock; |