mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-22 15:14:35 +00:00
Btrfs: remove no longer used function extent_read_full_page_nolock()
Not needed after the previous patch named "Btrfs: fix page reading in extent_same ioctl leading to csum errors". Signed-off-by: Filipe Manana <fdmanana@suse.com>
This commit is contained in:
parent
3131400230
commit
7f042a8370
3 changed files with 12 additions and 42 deletions
|
@ -637,11 +637,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
|
||||||
faili = nr_pages - 1;
|
faili = nr_pages - 1;
|
||||||
cb->nr_pages = nr_pages;
|
cb->nr_pages = nr_pages;
|
||||||
|
|
||||||
/* In the parent-locked case, we only locked the range we are
|
add_ra_bio_pages(inode, em_start + em_len, cb);
|
||||||
* interested in. In all other cases, we can opportunistically
|
|
||||||
* cache decompressed data that goes beyond the requested range. */
|
|
||||||
if (!(bio_flags & EXTENT_BIO_PARENT_LOCKED))
|
|
||||||
add_ra_bio_pages(inode, em_start + em_len, cb);
|
|
||||||
|
|
||||||
/* include any pages we added in add_ra-bio_pages */
|
/* include any pages we added in add_ra-bio_pages */
|
||||||
uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
|
uncompressed_len = bio->bi_vcnt * PAGE_CACHE_SIZE;
|
||||||
|
|
|
@ -2897,12 +2897,11 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
struct block_device *bdev;
|
struct block_device *bdev;
|
||||||
int ret;
|
int ret;
|
||||||
int nr = 0;
|
int nr = 0;
|
||||||
int parent_locked = *bio_flags & EXTENT_BIO_PARENT_LOCKED;
|
|
||||||
size_t pg_offset = 0;
|
size_t pg_offset = 0;
|
||||||
size_t iosize;
|
size_t iosize;
|
||||||
size_t disk_io_size;
|
size_t disk_io_size;
|
||||||
size_t blocksize = inode->i_sb->s_blocksize;
|
size_t blocksize = inode->i_sb->s_blocksize;
|
||||||
unsigned long this_bio_flag = *bio_flags & EXTENT_BIO_PARENT_LOCKED;
|
unsigned long this_bio_flag = 0;
|
||||||
|
|
||||||
set_page_extent_mapped(page);
|
set_page_extent_mapped(page);
|
||||||
|
|
||||||
|
@ -2942,18 +2941,16 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
kunmap_atomic(userpage);
|
kunmap_atomic(userpage);
|
||||||
set_extent_uptodate(tree, cur, cur + iosize - 1,
|
set_extent_uptodate(tree, cur, cur + iosize - 1,
|
||||||
&cached, GFP_NOFS);
|
&cached, GFP_NOFS);
|
||||||
if (!parent_locked)
|
unlock_extent_cached(tree, cur,
|
||||||
unlock_extent_cached(tree, cur,
|
cur + iosize - 1,
|
||||||
cur + iosize - 1,
|
&cached, GFP_NOFS);
|
||||||
&cached, GFP_NOFS);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
em = __get_extent_map(inode, page, pg_offset, cur,
|
em = __get_extent_map(inode, page, pg_offset, cur,
|
||||||
end - cur + 1, get_extent, em_cached);
|
end - cur + 1, get_extent, em_cached);
|
||||||
if (IS_ERR_OR_NULL(em)) {
|
if (IS_ERR_OR_NULL(em)) {
|
||||||
SetPageError(page);
|
SetPageError(page);
|
||||||
if (!parent_locked)
|
unlock_extent(tree, cur, end);
|
||||||
unlock_extent(tree, cur, end);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
extent_offset = cur - em->start;
|
extent_offset = cur - em->start;
|
||||||
|
@ -3038,12 +3035,9 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
|
|
||||||
set_extent_uptodate(tree, cur, cur + iosize - 1,
|
set_extent_uptodate(tree, cur, cur + iosize - 1,
|
||||||
&cached, GFP_NOFS);
|
&cached, GFP_NOFS);
|
||||||
if (parent_locked)
|
unlock_extent_cached(tree, cur,
|
||||||
free_extent_state(cached);
|
cur + iosize - 1,
|
||||||
else
|
&cached, GFP_NOFS);
|
||||||
unlock_extent_cached(tree, cur,
|
|
||||||
cur + iosize - 1,
|
|
||||||
&cached, GFP_NOFS);
|
|
||||||
cur = cur + iosize;
|
cur = cur + iosize;
|
||||||
pg_offset += iosize;
|
pg_offset += iosize;
|
||||||
continue;
|
continue;
|
||||||
|
@ -3052,8 +3046,7 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
if (test_range_bit(tree, cur, cur_end,
|
if (test_range_bit(tree, cur, cur_end,
|
||||||
EXTENT_UPTODATE, 1, NULL)) {
|
EXTENT_UPTODATE, 1, NULL)) {
|
||||||
check_page_uptodate(tree, page);
|
check_page_uptodate(tree, page);
|
||||||
if (!parent_locked)
|
unlock_extent(tree, cur, cur + iosize - 1);
|
||||||
unlock_extent(tree, cur, cur + iosize - 1);
|
|
||||||
cur = cur + iosize;
|
cur = cur + iosize;
|
||||||
pg_offset += iosize;
|
pg_offset += iosize;
|
||||||
continue;
|
continue;
|
||||||
|
@ -3063,8 +3056,7 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
*/
|
*/
|
||||||
if (block_start == EXTENT_MAP_INLINE) {
|
if (block_start == EXTENT_MAP_INLINE) {
|
||||||
SetPageError(page);
|
SetPageError(page);
|
||||||
if (!parent_locked)
|
unlock_extent(tree, cur, cur + iosize - 1);
|
||||||
unlock_extent(tree, cur, cur + iosize - 1);
|
|
||||||
cur = cur + iosize;
|
cur = cur + iosize;
|
||||||
pg_offset += iosize;
|
pg_offset += iosize;
|
||||||
continue;
|
continue;
|
||||||
|
@ -3083,8 +3075,7 @@ static int __do_readpage(struct extent_io_tree *tree,
|
||||||
*bio_flags = this_bio_flag;
|
*bio_flags = this_bio_flag;
|
||||||
} else {
|
} else {
|
||||||
SetPageError(page);
|
SetPageError(page);
|
||||||
if (!parent_locked)
|
unlock_extent(tree, cur, cur + iosize - 1);
|
||||||
unlock_extent(tree, cur, cur + iosize - 1);
|
|
||||||
}
|
}
|
||||||
cur = cur + iosize;
|
cur = cur + iosize;
|
||||||
pg_offset += iosize;
|
pg_offset += iosize;
|
||||||
|
@ -3213,20 +3204,6 @@ int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int extent_read_full_page_nolock(struct extent_io_tree *tree, struct page *page,
|
|
||||||
get_extent_t *get_extent, int mirror_num)
|
|
||||||
{
|
|
||||||
struct bio *bio = NULL;
|
|
||||||
unsigned long bio_flags = EXTENT_BIO_PARENT_LOCKED;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = __do_readpage(tree, page, get_extent, NULL, &bio, mirror_num,
|
|
||||||
&bio_flags, READ, NULL);
|
|
||||||
if (bio)
|
|
||||||
ret = submit_one_bio(READ, bio, mirror_num, bio_flags);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static noinline void update_nr_written(struct page *page,
|
static noinline void update_nr_written(struct page *page,
|
||||||
struct writeback_control *wbc,
|
struct writeback_control *wbc,
|
||||||
unsigned long nr_written)
|
unsigned long nr_written)
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
*/
|
*/
|
||||||
#define EXTENT_BIO_COMPRESSED 1
|
#define EXTENT_BIO_COMPRESSED 1
|
||||||
#define EXTENT_BIO_TREE_LOG 2
|
#define EXTENT_BIO_TREE_LOG 2
|
||||||
#define EXTENT_BIO_PARENT_LOCKED 4
|
|
||||||
#define EXTENT_BIO_FLAG_SHIFT 16
|
#define EXTENT_BIO_FLAG_SHIFT 16
|
||||||
|
|
||||||
/* these are bit numbers for test/set bit */
|
/* these are bit numbers for test/set bit */
|
||||||
|
@ -210,8 +209,6 @@ static inline int lock_extent(struct extent_io_tree *tree, u64 start, u64 end)
|
||||||
int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end);
|
int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end);
|
||||||
int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
|
int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
|
||||||
get_extent_t *get_extent, int mirror_num);
|
get_extent_t *get_extent, int mirror_num);
|
||||||
int extent_read_full_page_nolock(struct extent_io_tree *tree, struct page *page,
|
|
||||||
get_extent_t *get_extent, int mirror_num);
|
|
||||||
int __init extent_io_init(void);
|
int __init extent_io_init(void);
|
||||||
void extent_io_exit(void);
|
void extent_io_exit(void);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue