search for: btrfs_lookup_dentry

Displaying 12 results from an estimated 12 matches for "btrfs_lookup_dentry".

2013 Dec 13
2
[PATCH] Btrfs: fix error check of btrfs_lookup_dentry()
Clean up btrfs_lookup_dentry() to never return NULL, but PTR_ERR(-ENOENT) instead. This keeps the return value convention consistent. Callers who use btrfs_lookup_dentry() require a trivial update. create_snapshot() in particular looks like it can also lose a BUG_ON(!inode) which is not really needed - there seems less harm...
2011 Jun 29
0
[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()
The return value of btrfs_lookup_dentry is checked so that the panic such as illegal address reference should not occur. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- V1->V2: unnecessary BUG_ON was deleted V2->V3: to return -ENOENT instead of NULL when no entry was found, return value of btrfs_lookup_dentry...
2011 Jun 28
0
[PATCH v2] Btrfs: fix error check of btrfs_lookup_dentry()
The return value of btrfs_lookup_dentry is checked so that the panic such as illegal address reference should not occur. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> --- V1 -> V2: unnecessary BUG_ON was deleted fs/btrfs/ioctl.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/i...
2010 Jan 15
0
[PATCH] Btrfs: fix regression in orphan cleanup
...igned-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/inode.c | 6 ++++++ 1 files changed, 6 insertions(+), 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->cle...
2011 Aug 23
0
[PATCH] Btrfs: fix an oops when deleting snapshots
...ffffffff81145ac7>] ? fput+0x197/0x260 [<ffffffff810aecff>] ? audit_syscall_entry+0x1bf/0x1f0 [<ffffffff81153d0d>] sys_unlinkat+0x2d/0x40 [<ffffffff8147896b>] system_call_fastpath+0x16/0x1b RIP [<ffffffffa054f7b9>] btrfs_orphan_add+0x179/0x1a0 [btrfs] When it comes to btrfs_lookup_dentry, we may set a snapshot''s inode->i_ino to BTRFS_EMPTY_SUBVOL_DIR_OBJECTID instead of BTRFS_FIRST_FREE_OBJECTID, while the snapshot''s location.objectid remains unchanged. However, btrfs_ino() does not take this into account, and returns a wrong ino, and causes the oops. Signed-...
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
...de, 0, (u64)-1); + if (root->fs_info->log_root_recovering) { + BUG_ON(!list_empty(&BTRFS_I(inode)->i_orphan)); + goto no_delete; + } + if (inode->i_nlink > 0) { BUG_ON(btrfs_root_refs(&root->root_item) != 0); goto no_delete; @@ -3700,6 +3706,13 @@ struct inode *btrfs_lookup_dentry(struct inode *dir, struct dentry *dentry) } srcu_read_unlock(&root->fs_info->subvol_srcu, index); + if (root != sub_root) { + down_read(&root->fs_info->cleanup_work_sem); + if (!(inode->i_sb->s_flags & MS_RDONLY)) + btrfs_orphan_cleanup(sub_root); + up_read(...
2012 Aug 24
4
[PATCH] Btrfs: pass lockdep rwsem metadata to async commit transaction
The freeze rwsem is taken by sb_start_intwrite() and dropped during the commit_ or end_transaction(). In the async case, that happens in a worker thread. Tell lockdep the calling thread is releasing ownership of the rwsem and the async thread is picking it up. Josef and I worked out a more complicated solution that made the async commit thread join and potentially get a later transaction, but
2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
In fixing how we deal with bad inodes, we had a regression in the orphan cleanup code, since it expects to get a bad inode back. So fix it to deal with getting -ESTALE back by deleting the orphan item manually and moving on. Thanks, Reported-by: Simon Kirby <sim@hostway.ca> Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/inode.c | 36
2010 Mar 22
5
[PATCH 0/5] asynchronous commit, snapshot ponies
Hi everyone, This patchset is the latest approach I''m using for the Ceph storage daemon to keep track of which data has safely committed to disk. The basic idea is to not use the (problematic) user transaction ioctls at all. Instead, the daemon quiesces its own write requests, initiates an async snapshot, and then continues. The snapshot approach is nice because it provides rollback.
2010 Oct 25
14
[PATCH 0/6] Btrfs commit fixes, async subvol operations
Hi Chris, This is the extent of my current queue of Btrfs snapshot/subvol/commit stuff. Most of these were posted several months ago. Can be sent upstream during this merge window? Not having this functionality is becoming a bit of a roadblock for our efforts to keep the Ceph data in a consistent state. These patches are also available from
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...te_inode(trans, root, dir); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, objectid, root->root_key.objectid, dir->i_ino, index, name, namelen); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); d_instantiate(dentry, btrfs_lookup_dentry(dir, dentry)); fail: @@ -369,12 +369,12 @@ static int create_snapshot(struct btrfs_root *root, struct dentry *dentry) } ret = btrfs_snap_reserve_metadata(trans, pending_snapshot); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); list_add(&pending_snapshot->list, &trans->tran...
2010 Oct 08
5
Slow link/Capacity changed + Kernel OOPS... possible hardware issues, ideas?
...trfs] 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: [<c110183d>] link_path_walk+0x42d/0x920 Oct 8 02:40:43 (none) kernel: [<c1101e34>]...