forked from Minki/linux
btrfs: Remove leftover of in-band dedupe
It's unlikely in-band dedupe is going to land so just remove any leftovers - dedupe.h header as well as the 'dedupe' parameter to btrfs_set_extent_delalloc. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
74e9194afb
commit
330a582790
@ -3147,7 +3147,7 @@ int btrfs_start_delalloc_snapshot(struct btrfs_root *root);
|
||||
int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, int nr);
|
||||
int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
|
||||
unsigned int extra_bits,
|
||||
struct extent_state **cached_state, int dedupe);
|
||||
struct extent_state **cached_state);
|
||||
int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
|
||||
struct btrfs_root *new_root,
|
||||
struct btrfs_root *parent_root,
|
||||
|
@ -1,12 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (C) 2016 Fujitsu. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef BTRFS_DEDUPE_H
|
||||
#define BTRFS_DEDUPE_H
|
||||
|
||||
/* later in-band dedupe will expand this struct */
|
||||
struct btrfs_dedupe_hash;
|
||||
|
||||
#endif
|
@ -559,7 +559,7 @@ int btrfs_dirty_pages(struct inode *inode, struct page **pages,
|
||||
}
|
||||
|
||||
err = btrfs_set_extent_delalloc(inode, start_pos, end_of_last_block,
|
||||
extra_bits, cached, 0);
|
||||
extra_bits, cached);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "backref.h"
|
||||
#include "props.h"
|
||||
#include "qgroup.h"
|
||||
#include "dedupe.h"
|
||||
#include "delalloc-space.h"
|
||||
|
||||
struct btrfs_iget_args {
|
||||
@ -81,8 +80,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent);
|
||||
static noinline int cow_file_range(struct inode *inode,
|
||||
struct page *locked_page,
|
||||
u64 start, u64 end, int *page_started,
|
||||
unsigned long *nr_written, int unlock,
|
||||
struct btrfs_dedupe_hash *hash);
|
||||
unsigned long *nr_written, int unlock);
|
||||
static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 len,
|
||||
u64 orig_start, u64 block_start,
|
||||
u64 block_len, u64 orig_block_len,
|
||||
@ -762,8 +760,7 @@ retry:
|
||||
async_extent->start,
|
||||
async_extent->start +
|
||||
async_extent->ram_size - 1,
|
||||
&page_started, &nr_written, 0,
|
||||
NULL);
|
||||
&page_started, &nr_written, 0);
|
||||
|
||||
/* JDM XXX */
|
||||
|
||||
@ -948,8 +945,7 @@ static u64 get_extent_allocation_hint(struct inode *inode, u64 start,
|
||||
static noinline int cow_file_range(struct inode *inode,
|
||||
struct page *locked_page,
|
||||
u64 start, u64 end, int *page_started,
|
||||
unsigned long *nr_written, int unlock,
|
||||
struct btrfs_dedupe_hash *hash)
|
||||
unsigned long *nr_written, int unlock)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
@ -1506,8 +1502,7 @@ out_check:
|
||||
if (cow_start != (u64)-1) {
|
||||
ret = cow_file_range(inode, locked_page,
|
||||
cow_start, found_key.offset - 1,
|
||||
page_started, nr_written, 1,
|
||||
NULL);
|
||||
page_started, nr_written, 1);
|
||||
if (ret) {
|
||||
if (nocow)
|
||||
btrfs_dec_nocow_writers(fs_info,
|
||||
@ -1586,7 +1581,7 @@ out_check:
|
||||
if (cow_start != (u64)-1) {
|
||||
cur_offset = end;
|
||||
ret = cow_file_range(inode, locked_page, cow_start, end,
|
||||
page_started, nr_written, 1, NULL);
|
||||
page_started, nr_written, 1);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
@ -1645,7 +1640,7 @@ int btrfs_run_delalloc_range(struct inode *inode, struct page *locked_page,
|
||||
} else if (!inode_can_compress(inode) ||
|
||||
!inode_need_compress(inode, start, end)) {
|
||||
ret = cow_file_range(inode, locked_page, start, end,
|
||||
page_started, nr_written, 1, NULL);
|
||||
page_started, nr_written, 1);
|
||||
} else {
|
||||
set_bit(BTRFS_INODE_HAS_ASYNC_EXTENT,
|
||||
&BTRFS_I(inode)->runtime_flags);
|
||||
@ -2080,7 +2075,7 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
|
||||
|
||||
int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end,
|
||||
unsigned int extra_bits,
|
||||
struct extent_state **cached_state, int dedupe)
|
||||
struct extent_state **cached_state)
|
||||
{
|
||||
WARN_ON(PAGE_ALIGNED(end));
|
||||
return set_extent_delalloc(&BTRFS_I(inode)->io_tree, start, end,
|
||||
@ -2146,7 +2141,7 @@ again:
|
||||
}
|
||||
|
||||
ret = btrfs_set_extent_delalloc(inode, page_start, page_end, 0,
|
||||
&cached_state, 0);
|
||||
&cached_state);
|
||||
if (ret) {
|
||||
mapping_set_error(page->mapping, ret);
|
||||
end_extent_writepage(page, ret, page_start, page_end);
|
||||
@ -4941,7 +4936,7 @@ again:
|
||||
0, 0, &cached_state);
|
||||
|
||||
ret = btrfs_set_extent_delalloc(inode, block_start, block_end, 0,
|
||||
&cached_state, 0);
|
||||
&cached_state);
|
||||
if (ret) {
|
||||
unlock_extent_cached(io_tree, block_start, block_end,
|
||||
&cached_state);
|
||||
@ -8992,7 +8987,7 @@ again:
|
||||
0, 0, &cached_state);
|
||||
|
||||
ret2 = btrfs_set_extent_delalloc(inode, page_start, end, 0,
|
||||
&cached_state, 0);
|
||||
&cached_state);
|
||||
if (ret2) {
|
||||
unlock_extent_cached(io_tree, page_start, page_end,
|
||||
&cached_state);
|
||||
|
@ -3311,7 +3311,7 @@ static int relocate_file_extent_cluster(struct inode *inode,
|
||||
}
|
||||
|
||||
ret = btrfs_set_extent_delalloc(inode, page_start, page_end, 0,
|
||||
NULL, 0);
|
||||
NULL);
|
||||
if (ret) {
|
||||
unlock_page(page);
|
||||
put_page(page);
|
||||
|
@ -957,7 +957,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
|
||||
/* [BTRFS_MAX_EXTENT_SIZE] */
|
||||
ret = btrfs_set_extent_delalloc(inode, 0, BTRFS_MAX_EXTENT_SIZE - 1, 0,
|
||||
NULL, 0);
|
||||
NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
@ -972,7 +972,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
/* [BTRFS_MAX_EXTENT_SIZE][sectorsize] */
|
||||
ret = btrfs_set_extent_delalloc(inode, BTRFS_MAX_EXTENT_SIZE,
|
||||
BTRFS_MAX_EXTENT_SIZE + sectorsize - 1,
|
||||
0, NULL, 0);
|
||||
0, NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
@ -1005,7 +1005,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
ret = btrfs_set_extent_delalloc(inode, BTRFS_MAX_EXTENT_SIZE >> 1,
|
||||
(BTRFS_MAX_EXTENT_SIZE >> 1)
|
||||
+ sectorsize - 1,
|
||||
0, NULL, 0);
|
||||
0, NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
@ -1023,7 +1023,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
ret = btrfs_set_extent_delalloc(inode,
|
||||
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize,
|
||||
(BTRFS_MAX_EXTENT_SIZE << 1) + 3 * sectorsize - 1,
|
||||
0, NULL, 0);
|
||||
0, NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
@ -1040,7 +1040,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
*/
|
||||
ret = btrfs_set_extent_delalloc(inode,
|
||||
BTRFS_MAX_EXTENT_SIZE + sectorsize,
|
||||
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1, 0, NULL, 0);
|
||||
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1, 0, NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
@ -1075,7 +1075,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
|
||||
*/
|
||||
ret = btrfs_set_extent_delalloc(inode,
|
||||
BTRFS_MAX_EXTENT_SIZE + sectorsize,
|
||||
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1, 0, NULL, 0);
|
||||
BTRFS_MAX_EXTENT_SIZE + 2 * sectorsize - 1, 0, NULL);
|
||||
if (ret) {
|
||||
test_err("btrfs_set_extent_delalloc returned %d", ret);
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user