search for: ocfs2_lock_res_free

Displaying 20 results from an estimated 27 matches for "ocfs2_lock_res_free".

2013 May 06
2
[PATCH] ocfs2: unlock rw lock if inode lock failed
In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems without unlocking rw lock. This will cause a bug in ocfs2_lock_res_free when testing res->l_ex_holders, which is increased in __ocfs2_cluster_lock and decreased in __ocfs2_cluster_unlock. Signed-off-by: Joseph Qi <joseph.qi at huawei.com> --- fs/ocfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/fi...
2008 Oct 23
2
[PATCH 1/1] OCFS2: fix for nfs getting stale inode.
...+ u64 blkno, + struct ocfs2_super *osb) +{ + /* Dealloc lockreses don't come from a slab so we call init + * once on it manually. */ + ocfs2_lock_res_init_once(res); + ocfs2_lock_res_init_common(osb, res, OCFS2_LOCK_TYPE_DEALLOC, blkno, + 0, &ocfs2_dealloc_lops, osb); +} void ocfs2_lock_res_free(struct ocfs2_lock_res *res) { mlog_entry_void(); @@ -727,6 +753,36 @@ static void ocfs2_rename_bast_func(void mlog_exit_void(); } +static void ocfs2_dealloc_ast_func(void *opaque) +{ + struct ocfs2_lock_res *lockres = opaque; + + mlog_entry_void(); + mlog(0, "Dealloc AST fired\n"...
2009 Jun 04
3
Patches that adds delayed orphan scan timer (rev 3)
Resending after implementing review comments.
2009 Jun 02
3
Patches that adds delayed orphan scan timer (rev 2)
Resending after implementing review comments.
2009 Jun 02
3
Patches that adds delayed orphan scan timer
Resending after adding another patch to display delayed orphan scan statistics.
2009 May 19
2
[PATCH 1/1] OCFS2: timer to queue scan of all orphan slots
...sb); ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); + res = &osb->osb_delayed_orphan_scan->ds_lockres; + ocfs2_orphan_scan_lock_res_init(res, osb); + osb->cconn = conn; status = 0; @@ -2878,6 +2933,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb, ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); + ocfs2_lock_res_free(&osb->osb_delayed_orphan_scan->ds_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn...
2009 Mar 03
3
[PATCH 1/1] OCFS2: anti stale inode for nfs (V6)
...ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->cconn = conn; @@ -2828,6 +2871,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_sup ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn = NULL; @@ -3010,6 +3054,7 @@ static void ocfs2_drop_osb_locks(struct {...
2009 Mar 05
0
[PATCH 1/1] OCFS2: anti stale inode for nfs (V6.2)
...uper_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->cconn = conn; @@ -2828,6 +2872,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb, ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn = NULL; @@ -3010,6 +3055,7 @@ static void ocfs2_drop_osb_locks(struct ocfs2...
2009 Mar 06
0
[PATCH 1/1] OCFS2: anti stale inode for nfs (V6.3)
...uper_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->cconn = conn; @@ -2828,6 +2872,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb, ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn = NULL; @@ -3010,6 +3055,7 @@ static void ocfs2_drop_osb_locks(struct ocfs2...
2009 Feb 27
2
[PATCH 1/1] OCFS2: anti stale inode for nfs (V5)
...ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->cconn = conn; @@ -2828,6 +2871,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_sup ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn = NULL; @@ -3010,6 +3054,7 @@ static void ocfs2_drop_osb_locks(struct {...
2009 Jun 04
2
Backport that adds delayed orphan scan timer to 1.4
Next two patches are backport of orphan scan timer patches to ocfs2-1.4
2009 Mar 06
2
[PATCH 1/1] OCFS2: anti stale inode for nfs (for 1.4git)
...2_super_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->dlm = dlm; @@ -2698,6 +2741,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_super *osb) ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); dlm_unregister_domain(osb->dlm); osb->dlm = NULL; @@ -2892,6 +2936,7 @@ static void ocfs2_drop_osb_locks(struct ocfs2_super *osb) { ocfs2...
2009 Apr 21
1
[PATCH 1/1] ocfs2: Add missing iput() during error handling in ocfs2_dentry_attach_lock()
...@@ out_attach: else mlog_errno(ret); + /* + * In case of error, manually free the allocation and do the iput(). + * We need to do this because error here means no d_instantiate(), + * which means iput() will not be called during dput(dentry). + */ + if (ret < 0 && !alias) { + ocfs2_lock_res_free(&dl->dl_lockres); + BUG_ON(dl->dl_count != 1); + spin_lock(&dentry_attach_lock); + dentry->d_fsdata = NULL; + spin_unlock(&dentry_attach_lock); + kfree(dl); + iput(inode); + } + dput(alias); return ret; -- 1.5.6.3
2009 Feb 17
1
[PATCH 1/1] OCFS2: anti stale inode for nfs (V3)
...: ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->dlm = dlm; @@ -2698,6 +2741,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_sup ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); dlm_unregister_domain(osb->dlm); osb->dlm = NULL; @@ -2892,6 +2936,7 @@ static void ocfs2_drop_osb_locks(struct { ocfs2_simple_drop_lock...
2009 Feb 20
3
[PATCH 1/1] OCFS2: anti stale inode for nfs (V4)
...ocfs2_super_lock_res_init(&osb->osb_super_lockres, osb); ocfs2_rename_lock_res_init(&osb->osb_rename_lockres, osb); + ocfs2_nfs_sync_lock_res_init(&osb->osb_nfs_sync_lockres, osb); osb->cconn = conn; @@ -2828,6 +2871,7 @@ void ocfs2_dlm_shutdown(struct ocfs2_sup ocfs2_lock_res_free(&osb->osb_super_lockres); ocfs2_lock_res_free(&osb->osb_rename_lockres); + ocfs2_lock_res_free(&osb->osb_nfs_sync_lockres); ocfs2_cluster_disconnect(osb->cconn, hangup_pending); osb->cconn = NULL; @@ -3010,6 +3054,7 @@ static void ocfs2_drop_osb_locks(struct {...
2009 May 04
2
[PATCH 1/3] ocfs2: Add missing iput() during error handling in ocfs2_dentry_attach_lock()
...@@ out_attach: else mlog_errno(ret); + /* + * In case of error, manually free the allocation and do the iput(). + * We need to do this because error here means no d_instantiate(), + * which means iput() will not be called during dput(dentry). + */ + if (ret < 0 && !alias) { + ocfs2_lock_res_free(&dl->dl_lockres); + BUG_ON(dl->dl_count != 1); + spin_lock(&dentry_attach_lock); + dentry->d_fsdata = NULL; + spin_unlock(&dentry_attach_lock); + kfree(dl); + iput(inode); + } + dput(alias); return ret; -- 1.5.6.3
2009 Jun 18
8
Patches backported from mainline
All, Please review the patches backported to 1.4 from mainline. Sunil
2008 Oct 20
0
[PATCH] ocfs2: Implement quota syncing thread
...ore dquots and thus + * even if there's some sync in the pdflush queue, it won't + * find any dquots and return without doing anything */ + del_timer_sync(&oinfo->dqi_sync_timer); iput(oinfo->dqi_gqinode); ocfs2_simple_drop_lockres(OCFS2_SB(sb), &oinfo->dqi_gqlock); ocfs2_lock_res_free(&oinfo->dqi_gqlock); -- 1.5.2.4
2009 May 01
1
[GIT PULL] ocfs2 fixes
...@@ out_attach: else mlog_errno(ret); + /* + * In case of error, manually free the allocation and do the iput(). + * We need to do this because error here means no d_instantiate(), + * which means iput() will not be called during dput(dentry). + */ + if (ret < 0 && !alias) { + ocfs2_lock_res_free(&dl->dl_lockres); + BUG_ON(dl->dl_count != 1); + spin_lock(&dentry_attach_lock); + dentry->d_fsdata = NULL; + spin_unlock(&dentry_attach_lock); + kfree(dl); + iput(inode); + } + dput(alias); return ret; diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index e71160c..c57...
2009 Feb 13
44
[PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
The following series of patches attempts to detach metadata I/O from struct inode. They are currently tied together pretty tightly. Metadata reads happen via the ocfs2_read_blocks() functions, writes via both jbd2 and ocfs2_write_blocks(). - Each inode has a cache of associated metadata blocks stored on its ip_metadata_cache member. The ocfs2_read/write_blocks() functions take a struct