extent_map.c (6da6abae027e2dbc59bca5f4168b0760f25068c7) | extent_map.c (190662b2128dd648749e197f5563e9f6bbb5e05c) |
---|---|
1#include <linux/bitops.h> 2#include <linux/slab.h> 3#include <linux/bio.h> 4#include <linux/mm.h> 5#include <linux/gfp.h> 6#include <linux/pagemap.h> 7#include <linux/page-flags.h> 8#include <linux/module.h> --- 1056 unchanged lines hidden (view full) --- 1065 write_lock_irq(&tree->lock); 1066 /* 1067 * this search will find all the extents that end after 1068 * our range starts. 1069 */ 1070search_again: 1071 node = tree_search(&tree->state, cur_start); 1072 if (!node || IS_ERR(node)) { | 1#include <linux/bitops.h> 2#include <linux/slab.h> 3#include <linux/bio.h> 4#include <linux/mm.h> 5#include <linux/gfp.h> 6#include <linux/pagemap.h> 7#include <linux/page-flags.h> 8#include <linux/module.h> --- 1056 unchanged lines hidden (view full) --- 1065 write_lock_irq(&tree->lock); 1066 /* 1067 * this search will find all the extents that end after 1068 * our range starts. 1069 */ 1070search_again: 1071 node = tree_search(&tree->state, cur_start); 1072 if (!node || IS_ERR(node)) { |
1073 *end = (u64)-1; |
|
1073 goto out; 1074 } 1075 1076 while(1) { 1077 state = rb_entry(node, struct extent_state, rb_node); 1078 if (found && state->start != cur_start) { 1079 goto out; 1080 } 1081 if (!(state->state & EXTENT_DELALLOC)) { | 1074 goto out; 1075 } 1076 1077 while(1) { 1078 state = rb_entry(node, struct extent_state, rb_node); 1079 if (found && state->start != cur_start) { 1080 goto out; 1081 } 1082 if (!(state->state & EXTENT_DELALLOC)) { |
1083 if (!found) 1084 *end = state->end; |
|
1082 goto out; 1083 } 1084 if (!found) { 1085 struct extent_state *prev_state; 1086 struct rb_node *prev_node = node; 1087 while(1) { 1088 prev_node = rb_prev(prev_node); 1089 if (!prev_node) --- 746 unchanged lines hidden (view full) --- 1836 set_page_extent_mapped(page); 1837 1838 delalloc_start = start; 1839 delalloc_end = 0; 1840 while(delalloc_end < page_end) { 1841 nr_delalloc = find_lock_delalloc_range(tree, &delalloc_start, 1842 &delalloc_end, 1843 128 * 1024 * 1024); | 1085 goto out; 1086 } 1087 if (!found) { 1088 struct extent_state *prev_state; 1089 struct rb_node *prev_node = node; 1090 while(1) { 1091 prev_node = rb_prev(prev_node); 1092 if (!prev_node) --- 746 unchanged lines hidden (view full) --- 1839 set_page_extent_mapped(page); 1840 1841 delalloc_start = start; 1842 delalloc_end = 0; 1843 while(delalloc_end < page_end) { 1844 nr_delalloc = find_lock_delalloc_range(tree, &delalloc_start, 1845 &delalloc_end, 1846 128 * 1024 * 1024); |
1844 if (nr_delalloc <= 0) 1845 break; | 1847 if (nr_delalloc == 0) { 1848 delalloc_start = delalloc_end + 1; 1849 continue; 1850 } |
1846 tree->ops->fill_delalloc(inode, delalloc_start, 1847 delalloc_end); 1848 clear_extent_bit(tree, delalloc_start, 1849 delalloc_end, 1850 EXTENT_LOCKED | EXTENT_DELALLOC, 1851 1, 0, GFP_NOFS); 1852 delalloc_start = delalloc_end + 1; 1853 } --- 1328 unchanged lines hidden --- | 1851 tree->ops->fill_delalloc(inode, delalloc_start, 1852 delalloc_end); 1853 clear_extent_bit(tree, delalloc_start, 1854 delalloc_end, 1855 EXTENT_LOCKED | EXTENT_DELALLOC, 1856 1, 0, GFP_NOFS); 1857 delalloc_start = delalloc_end + 1; 1858 } --- 1328 unchanged lines hidden --- |