search for: btrfs_iget

Displaying 13 results from an estimated 13 matches for "btrfs_iget".

2011 Sep 05
1
Error on creating snapshots (btrfs: could not do orphan cleanup -116)
...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 something happening...
2008 Aug 28
0
[PATCH] btrfs: cleanup d_obtain_alias useage
...de; - struct inode *inode; - struct dentry *parent; struct btrfs_root *root = BTRFS_I(dir)->root; struct btrfs_key key; struct btrfs_path *path; @@ -203,13 +196,7 @@ static struct dentry *btrfs_get_parent(s btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); key.offset = 0; - inode = btrfs_iget(root->fs_info->sb, &key, root, NULL); - - parent = d_obtain_alias(inode); - if (!parent) - parent = ERR_PTR(-ENOMEM); - - return parent; + return d_obtain_alias(btrfs_iget(root->fs_info->sb, &key, root, NULL)); } const struct export_operations btrfs_export_ops = { -- To uns...
2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
...s(+), 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; - } - - /* - * add this inode to the orphan list so btrfs_orphan_del does - * the proper thing when we hit it -...
2013 Oct 25
1
[PATCH] Btrfs: stop using vfs_read in send
...sctx) -{ - int ret = 0; - struct btrfs_key key; - struct path path; - struct inode *inode; - struct dentry *dentry; - struct file *filp; - int new = 0; - - if (sctx->cur_inode_filp) - goto out; - - key.objectid = sctx->cur_ino; - key.type = BTRFS_INODE_ITEM_KEY; - key.offset = 0; - - inode = btrfs_iget(sctx->send_root->fs_info->sb, &key, sctx->send_root, - &new); - if (IS_ERR(inode)) { - ret = PTR_ERR(inode); - goto out; - } - - dentry = d_obtain_alias(inode); - inode = NULL; - if (IS_ERR(dentry)) { - ret = PTR_ERR(dentry); - goto out; - } - - path.mnt = sctx->mnt; -...
2008 Aug 30
0
[PATCH] btrfs: remove unused function btrfs_ilookup
...================================================== --- btrfs-unstable.orig/ctree.h 2008-08-30 11:08:58.000000000 -0300 +++ btrfs-unstable/ctree.h 2008-08-30 11:09:10.000000000 -0300 @@ -1698,8 +1698,6 @@ void btrfs_destroy_cachep(void); long btrfs_ioctl_trans_end(struct file *file); struct inode *btrfs_iget_locked(struct super_block *s, u64 objectid, struct btrfs_root *root); -struct inode *btrfs_ilookup(struct super_block *s, u64 objectid, - u64 root_objectid); struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location, struct btrfs_root *root, int *is_new); int btrf...
2010 Jan 15
0
[PATCH] Btrfs: fix regression in orphan cleanup
...0 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5440bab..f5d9384 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3796,6 +3796,12 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, 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); + }...
2011 Jun 29
0
[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()
...a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4025,7 +4025,7 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) return ERR_PTR(ret); if (location.objectid == 0) - return NULL; + return ERR_PTR(-ENOENT); if (location.type == BTRFS_INODE_ITEM_KEY) { inode = btrfs_iget(dir->i_sb, &location, root, NULL); @@ -4080,8 +4080,12 @@ static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry, struct inode *inode; inode = btrfs_lookup_dentry(dir, dentry); - if (IS_ERR(inode)) - return ERR_CAST(inode); + if (IS_ERR(inode)) { + if (PTR_ERR(in...
2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
...a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4910,7 +4910,7 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) return ERR_PTR(ret); if (location.objectid == 0) - return NULL; + return ERR_PTR(-ENOENT); if (location.type == BTRFS_INODE_ITEM_KEY) { inode = btrfs_iget(dir->i_sb, &location, root, NULL); @@ -4974,10 +4974,17 @@ static void btrfs_dentry_release(struct dentry *dentry) static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) { - struct dentry *ret; + struct inode *inode; - ret = d_splice_alia...
2008 Jul 20
26
[PATCH] NFS support for btrfs - v2
Hi, Here''s an implementation of NFS support for btrfs. It does not work in one particular case as described in http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg00298.html. This uses the btrfs_iget helper introduced previously. Comments ? --- Signed-off-by: Balaji Rao <balajirrao@gmail.com> diff -r 3f0eee804974 Makefile --- a/Makefile Thu Jun 26 10:34:20 2008 -0400 +++ b/Makefile Mon Jul 21 01:14:45 2008 +0530 @@ -6,7 +6,8 @@ hash.o file-item.o inode-item.o inode-map.o disk-io.o...
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range belongs to defragment so that we can implement snapshow-aware defrag: We set the EXTENT_DEFRAG flag when dirtying the extents that need defragmented, so later on writeback thread can differentiate between normal writeback and writeback started by defragmentation. This patch is used for the latter one. Originally patch
2010 Mar 02
3
2.6.33 high cpu usage
With the ATI bug I was hitting earlier fixed, only my btrfs partition continues to show high cpu usage for some operations. Rsync, git pull, git checkout and svn up are typicall operations which trigger the high cpu usage. As an example, this perf report is from using git checkout to change to a new branch; the change needed to checkout 208 files out of about 1600 total files. du(1) reports
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found the very last bug in my current scrub patch series: Changelog v4->v5: - fixed a deadlock when fixup is taking longer while scrub is about to end Original message follows: ------------------------ This patch set introduces two new features for scrub. They share the backref iteration code which is the
2010 Oct 08
5
Slow link/Capacity changed + Kernel OOPS... possible hardware issues, ideas?
...8 02:40:43 (none) kernel: [<f89b361f>] ? btrfs_dir_name_len+0xdf/0xf0 [btrfs] Oct 8 02:40:43 (none) kernel: [<f8993416>] btrfs_lookup_inode+0x36/0xb0 [btrfs] Oct 8 02:40:43 (none) kernel: [<c110b83a>] ? iget5_locked+0x16a/0x190 Oct 8 02:40:43 (none) kernel: [<f89a37ec>] btrfs_iget+0xdc/0x420 [btrfs] Oct 8 02:40:43 (none) kernel: [<f89a3fce>] btrfs_lookup_dentry+0x1de/0x430 [btrfs] Oct 8 02:40:43 (none) kernel: [<f89a422b>] btrfs_lookup+0xb/0x20 [btrfs] Oct 8 02:40:43 (none) kernel: [<c10ffc1b>] do_lookup+0x15b/0x1c0 Oct 8 02:40:43 (none) kernel: [<c1...