search for: i_nlink

Displaying 20 results from an estimated 33 matches for "i_nlink".

2006 Aug 31
2
a patch for ocfs2_link
This patch remove the redundant "i_nlink >= OCFS2_LINK_MAX" check and add an unlinked directory check. Singed-off-by: mfasheh diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 0673862..719a8d2 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -643,11 +643,6 @@ static int ocfs2_link(struct dentry *old g...
2008 Sep 22
1
[PATCH 1/1] OCFS2: add nlink check in ocfs2_inode_revalidate()
...wang <wen.gang.wang at oracle.com> -- diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 591e693..6b5a83e 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1186,6 +1186,13 @@ int ocfs2_inode_revalidate(struct dentry *dentry) status = -ENOENT; goto bail; } + + if (!inode->i_nlink) { + spin_unlock(&OCFS2_I(inode)->ip_lock); + mlog(0, "inode deleted!\n"); + status = -ENOENT; + goto bail; + } spin_unlock(&OCFS2_I(inode)->ip_lock); /* Let ocfs2_inode_lock do the work of updating our struct
2006 Dec 29
3
[git patches] ocfs2 fixes
Hi Linus, Here are some 2.6.20 fixes for ocfs2. The patch by Zhen Wei isn't really a fix, but a very small amount of support for a feature which is mostly implemented in ocfs2-tools. Considering it's just a single attribute export via configfs, I'd say it's pretty safe to merge. Please pull from 'upstream-linus' branch of
2013 Jun 20
2
[PATCH V2] ocfs2: need rollback when journal_access failed in ocfs2_orphan_add()
...ir, and orphan dir dinode updated, but file dinode has not been updated. Accordingly, the data is not consistent between file dinode and orphan dir. So, need to call ocfs2_journal_access_di() before __ocfs2_add_entry(), and if ocfs2_journal_access_di() failed, orphan_fe and orphan_dir_inode->i_nlink need rollback. Signed-off-by: Younger Liu <younger.liu at huawei.com> Cc: Jie Liu <jeff.liu at oracle.com> --- fs/ocfs2/namei.c | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index f5...
2009 Nov 12
0
[PATCH 05/12] Btrfs: Avoid orphan inodes cleanup during replaying log
..., 0, 0); if (ret < 0) { @@ -3293,6 +3294,11 @@ void btrfs_delete_inode(struct inode *inode) } btrfs_wait_ordered_range(inode, 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(&a...
2008 Sep 22
0
[PATCH 1/1] OCFS2: add validation in ocfs2_get_dentry()
we need do more checking for validation in ocfs2_get_dentry(). 1) OCFS2_INODE_DELETED flag 2) i_nlink the patch is against 1.4 git. Signed-off-by: Wengang wang <wen.gang.wang at oracle.com> -- diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 649f3c8..36ccf27 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c @@ -49,6 +49,7 @@ static struct dentry *ocfs2_get_dentry(struct super_b...
2009 Jan 30
8
[PATCH 0/7] ocfs2: Directory indexing support
The following patches implement indexed directory support in Ocfs2, mostly according to the design doc I wrote up a while ago: http://oss.oracle.com/osswiki/OCFS2/DesignDocs/IndexedDirectories The patches have been rebased on top of 2.6.29-rc2. It should be trivial to put them into merge_window. Things are what I'd call complete now. I'd like to get these into the merge_window branch
2011 Sep 21
3
[PATCH] Btrfs: fix orphan cleanup regression
..._orphan_del does + * the proper thing when we hit it + */ + spin_lock(&root->orphan_lock); + list_add(&BTRFS_I(inode)->i_orphan, &root->orphan_list); + spin_unlock(&root->orphan_lock); + /* if we have links, this was a truncate, lets do that */ if (inode->i_nlink) { if (!S_ISREG(inode->i_mode)) { -- 1.7.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://vger.kernel.org/majordomo-info.html
2013 Nov 19
6
[PATCH] Btrfs: fix very slow inode eviction and fs unmount
...; +} + void btrfs_evict_inode(struct inode *inode) { struct btrfs_trans_handle *trans; @@ -4498,7 +4554,8 @@ void btrfs_evict_inode(struct inode *inode) trace_btrfs_inode_evict(inode); - truncate_inode_pages(&inode->i_data, 0); + evict_inode_truncate_pages(inode); + if (inode->i_nlink && ((btrfs_root_refs(&root->root_item) != 0 && root->root_key.objectid != BTRFS_ROOT_TREE_OBJECTID) || @@ -7379,6 +7436,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned int offset, struct extent_state *cached_state = NULL; u64 page_start...
2009 Jan 14
15
Backport patches to ocfs2 1.4 tree from mainline
Found 15 patches (out of 162) that appeared relevant to ocfs2 1.4. Please review. Sunil
2009 Mar 17
33
[git patches] Ocfs2 updates for 2.6.30
Hi, The following patches comprise the bulk of Ocfs2 updates for the 2.6.30 merge window. Aside from larger, more involved fixes, we're adding the following features, which I will describe in the order their patches are mailed. Sunil's exported some more state to our debugfs files, and consolidated some other aspects of our debugfs infrastructure. This will further aid us in debugging
2001 Sep 20
0
NFS/InterMezzo ext3 problem
...xt3 on 2.4. Like the kernel NFS server, we have a routine in InterMezzo that does something like looking up an inode by inode number. (compare intermezzo's presto_ilookup or knfsd's nfsfh_iget) Effectively both of these routines do ilookup() { inode = iget(sb, ino) if (inode->i_nlink==0) iput(inode); .... } We find that this oopses if the file is recently deleted: echo foo > file rm file "ilookup file" oopses. We suspect that iget gets the inode _without_ hitting ext3_read_inode, ie. it is still in the hash lists. What happens is what we re-enter the...
2006 Feb 25
1
Linux performance bug: fsync() for files with zero links
Linux kernel (as of 2.6.15.4) has the following performance bug: Syncing (fsync() or fdatasync()) files with zero links (deleted files) in not no-op, as it should be. See details, a test C program, and the rationale in the URL below: http://b2e.ex-code.com/index.php/soft/2006/02/24/linux_performance_bug_zero_links_fsync In the article with the URL above it is also explained how to make much
2010 Aug 20
0
[PATCH] ocfs2: Don't delete orphaned files if we are in the process of umount.
...k_list = dl; diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 0492464..71b47c9 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1182,12 +1182,32 @@ static void ocfs2_clear_inode(struct inode *inode) void ocfs2_evict_inode(struct inode *inode) { + int delete = 0; + if (!inode->i_nlink || (OCFS2_I(inode)->ip_flags & OCFS2_INODE_MAYBE_ORPHANED)) { + /* + * In case we are in umount and we are now in the + * orphan dir, it is safe for us to just clear the + * inode and let the next mount, fsck or orphan scan + * from other live nodes to clear it for us. So skip...
2002 Jul 12
3
ext3 corruption
Hello, Over the last month or so, I've noticed the following error showing up repeatedly in my system logs under kernel 2.4.18-ac3 and more recently under 2.4.19-rc1: EXT3-fs error (device ide0(3,3)) in ext3_new_inode: error 28 I've now been able to capture the following Oops before the system went down entirely: Assertion failure in do_get_write_access() at transaction.c:611:
2009 Jan 12
5
[PATCH 0/5] OCFS2 quota fixes
Hello, the following series of patches fixes some issues with OCFS2 quotas. The first patch modifies VFS quota locking, the next patch uses the fact to simplify OCFS2 quota locking and solves a few deadlock issues. The third and the fourth patches fix another possible deadlocks in OCFS2 quota code and the last patch is a minor cleanup. Honza
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...o->trans_block_rsv; ret = btrfs_update_inode(trans, root, inode); if (ret) { err = ret; break; } -end_trans: + nr = trans->blocks_used; btrfs_end_transaction(trans, root); trans = NULL; btrfs_btree_balance_dirty(root, nr); } - if (ret == 0 && inode->i_nlink > 0) { - trans->block_rsv = root->orphan_block_rsv; - ret = btrfs_orphan_del(trans, inode); - if (ret) - err = ret; - } else if (ret && inode->i_nlink > 0) { - /* - * Failed to do the truncate, remove us from the in memory - * orphan list. - */ - ret = btrfs_orph...
2013 Oct 16
3
trivial cleanups
Hi gang, Here''s some trivial cleanups that I''ve built up while reading through the code. They''ve been run through xfstests -g quick. - z -- 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-info.html
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ree_path(path); if (ret) @@ -2868,11 +2868,11 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry) ret = btrfs_unlink_inode(trans, root, dir, dentry->d_inode, dentry->d_name.name, dentry->d_name.len); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); if (inode->i_nlink == 0) { ret = btrfs_orphan_add(trans, inode); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); } nr = trans->blocks_used; @@ -2905,7 +2905,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans, btrfs_dir_item_key_to_cpu(leaf, di, &key); WARN_ON(key.type != BTRFS_ROOT_ITEM_K...
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