Displaying 19 results from an estimated 19 matches for "extent_st".
Did you mean:
extents_st
2013 Nov 19
6
[PATCH] Btrfs: fix very slow inode eviction and fs unmount
The inode eviction can be very slow, because during eviction we
tell the VFS to truncate all of the inode''s pages. This results
in calls to btrfs_invalidatepage() which in turn does calls to
lock_extent_bits() and clear_extent_bit(). These calls result in
too many merges and splits of extent_state structures, which
consume a lot of time and cpu when the inode has many pages. In
some scenarios I have experienced umount times higher than 15
minutes, even when there''s no pending IO (after a btrfs fs sync).
A quick way to reproduce this issue:
$ mkfs.btrfs -f /dev/sdb3
$ mount /dev...
2007 Nov 06
0
[PATCH] check return value in extent map allocation
...TENT_LOCKED | EXTENT_WRITEBACK)
-void __init extent_map_init(void)
+int __init extent_map_init(void)
{
extent_map_cache = btrfs_cache_create("extent_map",
sizeof(struct extent_map),
SLAB_DESTROY_BY_RCU,
NULL);
+ if (!extent_map_cache)
+ return -ENOMEM;
+
extent_state_cache = btrfs_cache_create("extent_state",
sizeof(struct extent_state),
SLAB_DESTROY_BY_RCU,
NULL);
+ if (!extent_state_cache)
+ return -ENOMEM;
+
+ return 0;
}
void __exit extent_map_exit(void)
diff -r 29b8cc7794ac extent_map.h
--- a/extent_map.h Thu...
2010 Feb 02
0
[PATCH] Btrfs: cache extent state in find_delalloc_range
....c
+++ b/fs/btrfs/extent_io.c
@@ -1171,7 +1171,8 @@ out:
* 1 is returned if we find something, 0 if nothing was in the tree
*/
static noinline u64 find_delalloc_range(struct extent_io_tree *tree,
- u64 *start, u64 *end, u64 max_bytes)
+ u64 *start, u64 *end, u64 max_bytes,
+ struct extent_state **cached_state)
{
struct rb_node *node;
struct extent_state *state;
@@ -1203,8 +1204,11 @@ static noinline u64 find_delalloc_range(struct extent_io_tree *tree,
*end = state->end;
goto out;
}
- if (!found)
+ if (!found) {
*start = state->start;
+ *cached_state = sta...
2010 Mar 03
1
[PATCH V2] Btrfs: add direct I/O helper to process inline compressed extents.
Use access_extent_buffer_page() to point at btree location of
inline compressed data so it can be inflated without a memcopy.
Signed-off-by: jim owens <jowens@hp.com>
Signed-off-by: jim owens <jim6336@gmail.com>
---
V2 fixes whitespace checkpatch warning
fs/btrfs/extent_io.c | 16 ++++++++++++++++
fs/btrfs/extent_io.h | 3 +++
2 files changed, 19 insertions(+), 0 deletions(-)
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
...847..604e404 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1144,6 +1144,14 @@ int set_extent_delalloc(struct extent_io_tree *tree, u64 start, u64 end,
NULL, cached_state, mask);
}
+int set_extent_defrag(struct extent_io_tree *tree, u64 start, u64 end,
+ struct extent_state **cached_state, gfp_t mask)
+{
+ return set_extent_bit(tree, start, end,
+ EXTENT_DELALLOC | EXTENT_UPTODATE | EXTENT_DEFRAG,
+ NULL, cached_state, mask);
+}
+
int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end,
gfp_t mask)
{
diff --git a/fs/btrfs/...
2008 Nov 20
0
[PATCH] btrfs: sparse lock verification annotations for wait_on_state
...====================
--- btrfs-unstable.orig/fs/btrfs/extent_io.c 2008-11-20 19:37:10.000000000 +0100
+++ btrfs-unstable/fs/btrfs/extent_io.c 2008-11-20 19:38:44.000000000 +0100
@@ -577,6 +577,8 @@ EXPORT_SYMBOL(clear_extent_bit);
static int wait_on_state(struct extent_io_tree *tree,
struct extent_state *state)
+ __releases(tree->lock)
+ __acquires(tree->lock)
{
DEFINE_WAIT(wait);
prepare_to_wait(&state->wq, &wait, TASK_UNINTERRUPTIBLE);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.o...
2011 Jul 12
0
[PATCH] Btrfs: Remove unused variable 'last_index' in file.c
...re_uptodate_page(struct page *page, u64 pos)
static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
struct page **pages, size_t num_pages,
loff_t pos, unsigned long first_index,
- unsigned long last_index, size_t write_bytes)
+ size_t write_bytes)
{
struct extent_state *cached_state = NULL;
int i;
@@ -1159,7 +1159,6 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
struct btrfs_root *root = BTRFS_I(inode)->root;
struct page **pages = NULL;
unsigned long first_index;
- unsigned long last_index;
size_t num_written = 0;
int nrptr...
2011 Mar 31
4
[PATCH] Btrfs: fix free space cache when there are pinned extents and clusters
...;space\n", block_group->key.objectid);
+ ret = 0;
+ goto free_cache;
+ }
+ spin_unlock(&block_group->tree_lock);
+
ret = 1;
out:
kfree(checksums);
@@ -495,8 +508,11 @@ int btrfs_write_out_cache(struct btrfs_root *root,
struct list_head *pos, *n;
struct page *page;
struct extent_state *cached_state = NULL;
+ struct btrfs_free_cluster *cluster = NULL;
+ struct extent_io_tree *unpin = NULL;
struct list_head bitmap_list;
struct btrfs_key key;
+ u64 start, end, len;
u64 bytes = 0;
u32 *crc, *checksums;
pgoff_t index = 0, last_index = 0;
@@ -505,6 +521,7 @@ int btrfs_wri...
2013 Jan 16
6
[PATCH V2] mm/slab: add a leak decoder callback
...ions(+), 4 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index bcc8dff..355c7fc 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -63,6 +63,26 @@ tree_fs_info(struct extent_io_tree *tree)
return btrfs_sb(tree->mapping->host->i_sb);
}
+static void extent_state_leak_decoder(void *object)
+{
+ struct extent_state *state = object;
+
+ printk(KERN_ERR "btrfs state leak: start %llu end %llu "
+ "state %lu in tree %p refs %d\n",
+ (unsigned long long)state->start,
+ (unsigned long long)state->end,
+ stat...
2011 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all -
The following 9 patches add more error handling to the btrfs code:
- Add btrfs_panic
- Catch locking failures in {set,clear}_extent_bit
- Push up set_extent_bit errors to callers
- Push up lock_extent errors to callers
- Push up clear_extent_bit errors to callers
- Push up unlock_extent errors to callers
- Make pin_down_extent return void
- Push up btrfs_pin_extent errors to
2013 Jan 14
5
[PATCH] mm/slab: add a leak decoder callback
...ions(+), 0 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index bcc8dff..4954f3d 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -63,6 +63,26 @@ tree_fs_info(struct extent_io_tree *tree)
return btrfs_sb(tree->mapping->host->i_sb);
}
+static void extent_state_leak_decoder(void *object)
+{
+ struct extent_state *state = object;
+
+ printk(KERN_ERR "btrfs state leak: start %llu end %llu "
+ "state %lu in tree %p refs %d\n",
+ (unsigned long long)state->start,
+ (unsigned long long)state->end,
+ stat...
2012 Feb 16
3
[PATCH 1/4] Btrfs: be less strict on finding next node in clear_extent_bit
...es changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index fcf77e1..e941cc4 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -577,8 +577,7 @@ hit_next:
if (start <= end && next_node) {
state = rb_entry(next_node, struct extent_state,
rb_node);
- if (state->start == start)
- goto hit_next;
+ goto hit_next;
}
goto search_again;
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://...
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...->fs_info, err);
- return;
}
/*
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 8491712..99717f8 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -596,8 +596,8 @@ search_again:
goto again;
}
-static int wait_on_state(struct extent_io_tree *tree,
- struct extent_state *state)
+static void wait_on_state(struct extent_io_tree *tree,
+ struct extent_state *state)
__releases(tree->lock)
__acquires(tree->lock)
{
@@ -607,7 +607,6 @@ static int wait_on_state(struct extent_io_tree *tree,
schedule();
spin_lock(&tree->lock);
finish_wait(&a...
2013 Aug 29
0
[PATCH] Btrfs: allow partial ordered extent completion
...7 +++++
3 files changed, 62 insertions(+), 18 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 1c86f9d..11b5927 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2562,8 +2562,10 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
struct extent_state *cached_state = NULL;
struct new_sa_defrag_extent *new = NULL;
int compress_type = 0;
- int ret;
+ int ret = 0;
+ u64 logical_len = ordered_extent->len;
bool nolock;
+ bool truncated = false;
nolock = btrfs_is_free_space_inode(inode);
@@ -2572,6 +2574,14 @@ static int btrfs_finish...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...@@ out:
static int btrfs_truncate_page(struct address_space *mapping, loff_t from)
{
struct inode *inode = mapping->host;
- struct btrfs_root *root = BTRFS_I(inode)->root;
struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
struct btrfs_ordered_extent *ordered;
struct extent_state *cached_state = NULL;
char *kaddr;
- u32 blocksize = root->sectorsize;
pgoff_t index = from >> PAGE_CACHE_SHIFT;
unsigned offset = from & (PAGE_CACHE_SIZE-1);
struct page *page;
@@ -3261,8 +3268,6 @@ static int btrfs_truncate_page(struct address_space *mapping, loff_t from)...
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all -
Here''s my current error handling patchset, against 3.1-rc8. Almost all of
this patchset is preparing for actual error handling. Before we start in
on that work, I''m trying to reduce the surface we need to worry about. It
turns out that there is a ton of code that returns an error code but never
actually reports an error.
The patchset has grown to 65 patches. 46 of them
2011 Jun 10
6
[PATCH v2 0/6] btrfs: generic readeahead interface
...nt tree (traditional): 351s
- enumerating the extent tree (readahead): 41s
- enumerating extents+csum tree (readahead): 49s
The implementation is also tested with this tool in various combinations of
parallel reads of the same and of different trees.
The main changes from v1 are:
- Switch from extent_state flags to extent_buffer flags.
- Fix a race when triggering the read.
- Fix a bug where only parts of the requested range where actually prefetched.
The hit only when requesting parts of a tree, so the above numbers doesn''t
change.
Arne Jansen (6):
btrfs: add an extra wait mod...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read,
just in case it was actually a short read and we need to just return.
This is similar to what already happens in the write case. If we have a short
read while doing O_DIRECT, instead of just returning, fallthrough and try to
read the rest via buffered IO. BTRFS needs this because if we encounter a
compressed or
2011 Jun 29
14
[PATCH v4 0/6] btrfs: generic readeahead interface
...nt tree (traditional): 351s
- enumerating the extent tree (readahead): 41s
- enumerating extents+csum tree (readahead): 49s
The implementation is also tested with this tool in various combinations of
parallel reads of the same and of different trees.
The main changes from v1 are:
- Switch from extent_state flags to extent_buffer flags.
- Fix a race when triggering the read.
- Fix a bug where only parts of the requested range where actually prefetched.
The hit only when requesting parts of a tree, so the above numbers doesn''t
change.
Change from v2:
- use rcu instead of transactio...