diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d79ccdbfdd95..c3dfe2a0ec85 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -112,7 +112,7 @@ void extent_io_tree_init(struct extent_io_tree *tree, | |||
112 | } | 112 | } |
113 | EXPORT_SYMBOL(extent_io_tree_init); | 113 | EXPORT_SYMBOL(extent_io_tree_init); |
114 | 114 | ||
115 | struct extent_state *alloc_extent_state(gfp_t mask) | 115 | static struct extent_state *alloc_extent_state(gfp_t mask) |
116 | { | 116 | { |
117 | struct extent_state *state; | 117 | struct extent_state *state; |
118 | #ifdef LEAK_DEBUG | 118 | #ifdef LEAK_DEBUG |
@@ -136,7 +136,7 @@ struct extent_state *alloc_extent_state(gfp_t mask) | |||
136 | } | 136 | } |
137 | EXPORT_SYMBOL(alloc_extent_state); | 137 | EXPORT_SYMBOL(alloc_extent_state); |
138 | 138 | ||
139 | void free_extent_state(struct extent_state *state) | 139 | static void free_extent_state(struct extent_state *state) |
140 | { | 140 | { |
141 | if (!state) | 141 | if (!state) |
142 | return; | 142 | return; |
@@ -662,7 +662,7 @@ static void set_state_bits(struct extent_io_tree *tree, | |||
662 | * [start, end] is inclusive | 662 | * [start, end] is inclusive |
663 | * This takes the tree lock. | 663 | * This takes the tree lock. |
664 | */ | 664 | */ |
665 | int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits, | 665 | static int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits, |
666 | int exclusive, u64 *failed_start, gfp_t mask) | 666 | int exclusive, u64 *failed_start, gfp_t mask) |
667 | { | 667 | { |
668 | struct extent_state *state; | 668 | struct extent_state *state; |
@@ -879,12 +879,11 @@ int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end, | |||
879 | } | 879 | } |
880 | EXPORT_SYMBOL(set_extent_new); | 880 | EXPORT_SYMBOL(set_extent_new); |
881 | 881 | ||
882 | int clear_extent_new(struct extent_io_tree *tree, u64 start, u64 end, | 882 | static int clear_extent_new(struct extent_io_tree *tree, u64 start, u64 end, |
883 | gfp_t mask) | 883 | gfp_t mask) |
884 | { | 884 | { |
885 | return clear_extent_bit(tree, start, end, EXTENT_NEW, 0, 0, mask); | 885 | return clear_extent_bit(tree, start, end, EXTENT_NEW, 0, 0, mask); |
886 | } | 886 | } |
887 | EXPORT_SYMBOL(clear_extent_new); | ||
888 | 887 | ||
889 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, | 888 | int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, |
890 | gfp_t mask) | 889 | gfp_t mask) |
@@ -894,27 +893,24 @@ int set_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, | |||
894 | } | 893 | } |
895 | EXPORT_SYMBOL(set_extent_uptodate); | 894 | EXPORT_SYMBOL(set_extent_uptodate); |
896 | 895 | ||
897 | int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, | 896 | static int clear_extent_uptodate(struct extent_io_tree *tree, u64 start, u64 end, |
898 | gfp_t mask) | 897 | gfp_t mask) |
899 | { | 898 | { |
900 | return clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, 0, mask); | 899 | return clear_extent_bit(tree, start, end, EXTENT_UPTODATE, 0, 0, mask); |
901 | } | 900 | } |
902 | EXPORT_SYMBOL(clear_extent_uptodate); | ||
903 | 901 | ||
904 | int set_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end, | 902 | static int set_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end, |
905 | gfp_t mask) | 903 | gfp_t mask) |
906 | { | 904 | { |
907 | return set_extent_bit(tree, start, end, EXTENT_WRITEBACK, | 905 | return set_extent_bit(tree, start, end, EXTENT_WRITEBACK, |
908 | 0, NULL, mask); | 906 | 0, NULL, mask); |
909 | } | 907 | } |
910 | EXPORT_SYMBOL(set_extent_writeback); | ||
911 | 908 | ||
912 | int clear_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end, | 909 | static int clear_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end, |
913 | gfp_t mask) | 910 | gfp_t mask) |
914 | { | 911 | { |
915 | return clear_extent_bit(tree, start, end, EXTENT_WRITEBACK, 1, 0, mask); | 912 | return clear_extent_bit(tree, start, end, EXTENT_WRITEBACK, 1, 0, mask); |
916 | } | 913 | } |
917 | EXPORT_SYMBOL(clear_extent_writeback); | ||
918 | 914 | ||
919 | int wait_on_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end) | 915 | int wait_on_extent_writeback(struct extent_io_tree *tree, u64 start, u64 end) |
920 | { | 916 | { |
@@ -994,7 +990,7 @@ EXPORT_SYMBOL(set_range_dirty); | |||
994 | /* | 990 | /* |
995 | * helper function to set both pages and extents in the tree writeback | 991 | * helper function to set both pages and extents in the tree writeback |
996 | */ | 992 | */ |
997 | int set_range_writeback(struct extent_io_tree *tree, u64 start, u64 end) | 993 | static int set_range_writeback(struct extent_io_tree *tree, u64 start, u64 end) |
998 | { | 994 | { |
999 | unsigned long index = start >> PAGE_CACHE_SHIFT; | 995 | unsigned long index = start >> PAGE_CACHE_SHIFT; |
1000 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; | 996 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; |
@@ -1010,7 +1006,6 @@ int set_range_writeback(struct extent_io_tree *tree, u64 start, u64 end) | |||
1010 | set_extent_writeback(tree, start, end, GFP_NOFS); | 1006 | set_extent_writeback(tree, start, end, GFP_NOFS); |
1011 | return 0; | 1007 | return 0; |
1012 | } | 1008 | } |
1013 | EXPORT_SYMBOL(set_range_writeback); | ||
1014 | 1009 | ||
1015 | /* | 1010 | /* |
1016 | * find the first offset in the io tree with 'bits' set. zero is | 1011 | * find the first offset in the io tree with 'bits' set. zero is |
@@ -1432,11 +1427,13 @@ out: | |||
1432 | spin_unlock_irq(&tree->lock); | 1427 | spin_unlock_irq(&tree->lock); |
1433 | return total_bytes; | 1428 | return total_bytes; |
1434 | } | 1429 | } |
1430 | |||
1431 | #if 0 | ||
1435 | /* | 1432 | /* |
1436 | * helper function to lock both pages and extents in the tree. | 1433 | * helper function to lock both pages and extents in the tree. |
1437 | * pages must be locked first. | 1434 | * pages must be locked first. |
1438 | */ | 1435 | */ |
1439 | int lock_range(struct extent_io_tree *tree, u64 start, u64 end) | 1436 | static int lock_range(struct extent_io_tree *tree, u64 start, u64 end) |
1440 | { | 1437 | { |
1441 | unsigned long index = start >> PAGE_CACHE_SHIFT; | 1438 | unsigned long index = start >> PAGE_CACHE_SHIFT; |
1442 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; | 1439 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; |
@@ -1473,12 +1470,11 @@ failed: | |||
1473 | } | 1470 | } |
1474 | return err; | 1471 | return err; |
1475 | } | 1472 | } |
1476 | EXPORT_SYMBOL(lock_range); | ||
1477 | 1473 | ||
1478 | /* | 1474 | /* |
1479 | * helper function to unlock both pages and extents in the tree. | 1475 | * helper function to unlock both pages and extents in the tree. |
1480 | */ | 1476 | */ |
1481 | int unlock_range(struct extent_io_tree *tree, u64 start, u64 end) | 1477 | static int unlock_range(struct extent_io_tree *tree, u64 start, u64 end) |
1482 | { | 1478 | { |
1483 | unsigned long index = start >> PAGE_CACHE_SHIFT; | 1479 | unsigned long index = start >> PAGE_CACHE_SHIFT; |
1484 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; | 1480 | unsigned long end_index = end >> PAGE_CACHE_SHIFT; |
@@ -1493,7 +1489,7 @@ int unlock_range(struct extent_io_tree *tree, u64 start, u64 end) | |||
1493 | unlock_extent(tree, start, end, GFP_NOFS); | 1489 | unlock_extent(tree, start, end, GFP_NOFS); |
1494 | return 0; | 1490 | return 0; |
1495 | } | 1491 | } |
1496 | EXPORT_SYMBOL(unlock_range); | 1492 | #endif |
1497 | 1493 | ||
1498 | /* | 1494 | /* |
1499 | * set the private field for a given byte offset in the tree. If there isn't | 1495 | * set the private field for a given byte offset in the tree. If there isn't |
@@ -1956,7 +1952,7 @@ void set_page_extent_mapped(struct page *page) | |||
1956 | } | 1952 | } |
1957 | EXPORT_SYMBOL(set_page_extent_mapped); | 1953 | EXPORT_SYMBOL(set_page_extent_mapped); |
1958 | 1954 | ||
1959 | void set_page_extent_head(struct page *page, unsigned long len) | 1955 | static void set_page_extent_head(struct page *page, unsigned long len) |
1960 | { | 1956 | { |
1961 | set_page_private(page, EXTENT_PAGE_PRIVATE_FIRST_PAGE | len << 2); | 1957 | set_page_private(page, EXTENT_PAGE_PRIVATE_FIRST_PAGE | len << 2); |
1962 | } | 1958 | } |
@@ -2397,7 +2393,7 @@ update_nr_written: | |||
2397 | * WB_SYNC_ALL then we were called for data integrity and we must wait for | 2393 | * WB_SYNC_ALL then we were called for data integrity and we must wait for |
2398 | * existing IO to complete. | 2394 | * existing IO to complete. |
2399 | */ | 2395 | */ |
2400 | int extent_write_cache_pages(struct extent_io_tree *tree, | 2396 | static int extent_write_cache_pages(struct extent_io_tree *tree, |
2401 | struct address_space *mapping, | 2397 | struct address_space *mapping, |
2402 | struct writeback_control *wbc, | 2398 | struct writeback_control *wbc, |
2403 | writepage_t writepage, void *data, | 2399 | writepage_t writepage, void *data, |
@@ -2502,7 +2498,6 @@ retry: | |||
2502 | } | 2498 | } |
2503 | return ret; | 2499 | return ret; |
2504 | } | 2500 | } |
2505 | EXPORT_SYMBOL(extent_write_cache_pages); | ||
2506 | 2501 | ||
2507 | static noinline void flush_write_bio(void *data) | 2502 | static noinline void flush_write_bio(void *data) |
2508 | { | 2503 | { |