diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:50:55 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-18 19:50:55 -0400 |
| commit | 441f4058a04b2943685ff94e0f5f1992b0b3649e (patch) | |
| tree | 80a61f6dddcf7d5831a8bd3771ffa2b430af3935 /fs/btrfs/extent-tree.c | |
| parent | 7c34691abe23741bfc7d2514efd5a39f0e0ecb06 (diff) | |
| parent | 8ad6fcab564c5bc956bdc3dfa440ab152b6e780f (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (30 commits)
Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree
Btrfs: allow treeid==0 in the inode lookup ioctl
Btrfs: return keys for large items to the search ioctl
Btrfs: fix key checks and advance in the search ioctl
Btrfs: buffer results in the space_info ioctl
Btrfs: use __u64 types in ioctl.h
Btrfs: fix search_ioctl key advance
Btrfs: fix gfp flags masking in the compression code
Btrfs: don't look at bio flags after submit_bio
btrfs: using btrfs_stack_device_id() get devid
btrfs: use memparse
Btrfs: add a "df" ioctl for btrfs
Btrfs: cache the extent state everywhere we possibly can V2
Btrfs: cache ordered extent when completing io
Btrfs: cache extent state in find_delalloc_range
Btrfs: change the ordered tree to use a spinlock instead of a mutex
Btrfs: finish read pages in the order they are submitted
btrfs: fix btrfs_mkdir goto for no free objectids
Btrfs: flush data on snapshot creation
Btrfs: make df be a little bit more understandable
...
Diffstat (limited to 'fs/btrfs/extent-tree.c')
| -rw-r--r-- | fs/btrfs/extent-tree.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 559f72489b3b..1727b26fb194 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
| @@ -6561,6 +6561,7 @@ static noinline int invalidate_extent_cache(struct btrfs_root *root, | |||
| 6561 | struct btrfs_key key; | 6561 | struct btrfs_key key; |
| 6562 | struct inode *inode = NULL; | 6562 | struct inode *inode = NULL; |
| 6563 | struct btrfs_file_extent_item *fi; | 6563 | struct btrfs_file_extent_item *fi; |
| 6564 | struct extent_state *cached_state = NULL; | ||
| 6564 | u64 num_bytes; | 6565 | u64 num_bytes; |
| 6565 | u64 skip_objectid = 0; | 6566 | u64 skip_objectid = 0; |
| 6566 | u32 nritems; | 6567 | u32 nritems; |
| @@ -6589,12 +6590,14 @@ static noinline int invalidate_extent_cache(struct btrfs_root *root, | |||
| 6589 | } | 6590 | } |
| 6590 | num_bytes = btrfs_file_extent_num_bytes(leaf, fi); | 6591 | num_bytes = btrfs_file_extent_num_bytes(leaf, fi); |
| 6591 | 6592 | ||
| 6592 | lock_extent(&BTRFS_I(inode)->io_tree, key.offset, | 6593 | lock_extent_bits(&BTRFS_I(inode)->io_tree, key.offset, |
| 6593 | key.offset + num_bytes - 1, GFP_NOFS); | 6594 | key.offset + num_bytes - 1, 0, &cached_state, |
| 6595 | GFP_NOFS); | ||
| 6594 | btrfs_drop_extent_cache(inode, key.offset, | 6596 | btrfs_drop_extent_cache(inode, key.offset, |
| 6595 | key.offset + num_bytes - 1, 1); | 6597 | key.offset + num_bytes - 1, 1); |
| 6596 | unlock_extent(&BTRFS_I(inode)->io_tree, key.offset, | 6598 | unlock_extent_cached(&BTRFS_I(inode)->io_tree, key.offset, |
| 6597 | key.offset + num_bytes - 1, GFP_NOFS); | 6599 | key.offset + num_bytes - 1, &cached_state, |
| 6600 | GFP_NOFS); | ||
| 6598 | cond_resched(); | 6601 | cond_resched(); |
| 6599 | } | 6602 | } |
| 6600 | iput(inode); | 6603 | iput(inode); |
