Displaying 14 results from an estimated 14 matches for "btrfs_orphan_cleanup".
2011 Oct 04
3
[PATCH] Btrfs: break out of orphan cleanup if we can't make progress V2
...f@redhat.com>
---
V1->V2: set last_objectid properly
fs/btrfs/inode.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 446531a..595a807 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2230,6 +2230,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
struct btrfs_key key, found_key;
struct btrfs_trans_handle *trans;
struct inode *inode;
+ u64 last_objectid = 0;
int ret = 0, nr_unlink = 0, nr_truncate = 0;
if (cmpxchg(&root->orphan_cleanup_state, 0, ORPHAN_CLEANUP_STARTED))
@@ -2281,6 +2282,16 @@ int b...
2011 Sep 05
1
Error on creating snapshots (btrfs: could not do orphan cleanup -116)
...`[PATCH] btrfs: fix warning in iput for bad-inode.''
I did a little bit of research on the problem, and while I''m too
unfamiliar with the code of btrfs to diagnose it,
I''d like to share some of the observations as they appear to be of importance:
The failure happens when btrfs_orphan_cleanup calls btrfs_iget to get
the inode and it returns
ERR_PTR(-ESTALE). This happens when is_bad_inode(inode) is true.
However, after the call
to btrfs_iget there is an explicit code path for the case when
is_bad_inode(inode) is true (line 2393).
This code path would *never ever* get executed unless som...
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
...s = 1;
+ }
spin_unlock(&fs_info->fs_roots_radix_lock);
radix_tree_preload_end();
if (ret) {
@@ -1227,10 +1230,6 @@ again:
ret = btrfs_find_dead_roots(fs_info->tree_root,
root->root_key.objectid);
WARN_ON(ret);
-
- if (!(fs_info->sb->s_flags & MS_RDONLY))
- btrfs_orphan_cleanup(root);
-
return root;
fail:
free_fs_root(root);
@@ -1689,6 +1688,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
mutex_init(&fs_info->cleaner_mutex);
mutex_init(&fs_info->volume_mutex);
init_rwsem(&fs_info->extent_commit_sem);
+ init_rwsem(&fs_info->...
2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
...ik <josef@redhat.com>
---
fs/btrfs/inode.c | 36 +++++++++++++++++-------------------
1 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index b128fa0..d8bd665 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2285,37 +2285,35 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
found_key.type = BTRFS_INODE_ITEM_KEY;
found_key.offset = 0;
inode = btrfs_iget(root->fs_info->sb, &found_key, root, NULL);
- if (IS_ERR(inode)) {
- ret = PTR_ERR(inode);
+ ret = PTR_RET(inode);
+ if (ret && ret != -ESTALE)
goto out;
- }...
2013 Feb 07
1
[PATCH] Btrfs: cleanup orphan reservation if truncate fails
...Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 73e9409..905297f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2538,6 +2538,8 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
goto out;
ret = btrfs_truncate(inode);
+ if (ret)
+ btrfs_orphan_del(NULL, inode);
} else {
nr_unlink++;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.k...
2009 Oct 02
0
[PATCH] btrfs: constify dentry_operations
...Dobriyan <adobriyan@gmail.com>
---
fs/btrfs/ctree.h | 2 +-
fs/btrfs/inode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2323,7 +2323,7 @@ int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode);
void btrfs_orphan_cleanup(struct btrfs_root *root);
int btrfs_cont_expand(struct inode *inode, loff_t size);
int btrfs_invalidate_inodes(struct btrfs_root *root);
-extern struct dentry_operations btrfs_dentry_operations;
+extern const struct dentry_operations btrfs_dentry_operations;
/* ioctl.c */
long btrfs_ioctl(str...
2010 Jan 15
0
[PATCH] Btrfs: fix regression in orphan cleanup
...struct dentry *dentry)
if (location.type == BTRFS_INODE_ITEM_KEY) {
inode = btrfs_iget(dir->i_sb, &location, root);
+ if (unlikely(root->clean_orphans) &&
+ !(inode->i_sb->s_flags & MS_RDONLY)) {
+ down_read(&root->fs_info->cleanup_work_sem);
+ btrfs_orphan_cleanup(root);
+ up_read(&root->fs_info->cleanup_work_sem);
+ }
return inode;
}
--
1.5.4.3
--
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://vger.kernel.org/majordomo...
2013 Mar 20
0
[PATCH] btrfs: make orphan cleanup less verbose
...ilesystem.
Signed-off-by: David Sterba <dsterba@suse.cz>
---
fs/btrfs/inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 315a515..41a4d9c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3221,9 +3221,9 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
}
if (nr_unlink)
- printk(KERN_INFO "btrfs: unlinked %d orphans\n", nr_unlink);
+ printk(KERN_DEBUG "btrfs: unlinked %d orphans\n", nr_unlink);
if (nr_truncate)
- printk(KERN_INFO "btrfs: truncated %d orphans\n", nr_truncate);
+ pri...
2010 Jan 25
1
[PATCH] Btrfs: fix another orphan cleanup problem
...Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/inode.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index c7fbfaa..067f4b5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2202,6 +2202,17 @@ void btrfs_orphan_cleanup(struct btrfs_root *root)
* the proper thing when we hit it
*/
spin_lock(&root->list_lock);
+ if (!list_empty(&BTRFS_I(inode)->i_orphan)) {
+ /*
+ * This inode is on the in-memory list, which means we
+ * shouldn''t be cleaning it up, move on to the next
+...
2011 Jun 09
2
[PATCH] Btrfs: turn to readonly if btrfs_start_transaction() fails
...trans = btrfs_start_transaction(root, 0);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
+ btrfs_abort_transaction(root, ret);
goto out;
}
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 02ff4a1..ecdc333 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2394,6 +2394,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
trans = btrfs_start_transaction(root, 0);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
+ btrfs_abort_transaction(root, ret);
goto out;
}
btrfs_orphan_del(trans, inode);
@@ -2848,6 +2849,8 @@ static struct btrfs_trans_handle *__unlink_start_trans(s...
2012 Apr 20
44
Ceph on btrfs 3.4rc
After running ceph on XFS for some time, I decided to try btrfs again.
Performance with the current "for-linux-min" branch and big metadata
is much better. The only problem (?) I''m still seeing is a warning
that seems to occur from time to time:
[87703.784552] ------------[ cut here ]------------
[87703.789759] WARNING: at fs/btrfs/inode.c:2103
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...nt btrfs_truncate(struct inode *inode);
+static int btrfs_truncate(struct inode *inode, loff_t newsize);
static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end);
static noinline int cow_file_range(struct inode *inode,
struct page *locked_page,
@@ -2230,7 +2230,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root)
* btrfs_delalloc_reserve_space to catch offenders.
*/
mutex_lock(&inode->i_mutex);
- ret = btrfs_truncate(inode);
+ ret = btrfs_truncate(inode, inode->i_size);
mutex_unlock(&inode->i_mutex);
} else {
nr_unlink++;
@@ -2993,7 +299...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...set = start;
@@ -1566,6 +1574,7 @@ static int btrfs_finish_ordered_io(struct inode *inode, u64 start, u64 end)
}
trans = btrfs_join_transaction(root, 1);
+ BUG_ON(IS_ERR(trans));
if (!ordered_extent)
ordered_extent = btrfs_lookup_ordered_extent(inode, start);
@@ -1981,7 +1990,9 @@ void btrfs_orphan_cleanup(struct btrfs_root *root)
* do a destroy_inode
*/
if (is_bad_inode(inode)) {
+ /* 1 item for the orphan entry */
trans = btrfs_start_transaction(root, 1);
+ BUG_ON(IS_ERR(trans));
btrfs_orphan_del(trans, inode);
btrfs_end_transaction(trans, root);
iput(inode);
@@ -2337...
2011 Aug 23
40
[PATCH 00/21] [RFC] Btrfs: restriper
Hello,
This patch series adds an initial implementation of restriper (it''s a
clever name for relocation framework that allows to do selective profile
changing and selective balancing with some goodies like pausing/resuming
and reporting progress to the user.
Profile changing is global (per-FS) so far, per-subvolume profiles
require some discussion and can be implemented in future.