search for: ocfs2_commit_trans

Displaying 20 results from an estimated 35 matches for "ocfs2_commit_trans".

2013 Jun 19
1
ocfs2: Should move ocfs2_start_trans out of lock_page
Currently ocfs2_start_trans/ocfs2_commit_trans are in lock_page/unlock_page. This may cause dead lock. Here is the situation: write -> lock_page -> ocfs2_start_trans -> ocfs2_commit_trans -> unlock_page ocfs2_start_trans/ocfs2_commit_trans calls jbd2_journal_start/jbd2_journal_stop which may also call lock_page. So if the page oper...
2023 Apr 21
1
[PATCH] ocfs2: fix missing reset j_num_trans for sync
...sum to verify target file. line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. this case is hanging at line 65. In 266, md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. but there is only ->j_num_trans+1 in ocfs2_start_trans, the ocfs2_commit_trans doesn't do reduction operation. call flow: ``` [md5sum] vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //no modify j_num_trans _dmerror_...
2023 Apr 22
1
[PATCH] ocfs2: fix missing reset j_num_trans for sync
.... line 57 run 'sync' before line 58 changes the dm > target from dm-linear to dm-error. this case is hanging at line 65. > > In 266, md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to > do journal job. but there is only ->j_num_trans+1 in ocfs2_start_trans, > the ocfs2_commit_trans doesn't do reduction operation. > > call flow: > ``` > [md5sum] > vfs_read > ocfs2_file_read_iter > ocfs2_inode_lock_atime > ocfs2_update_inode_atime > + ocfs2_start_trans //atomic_inc j_num_trans > + ... > + ocfs2_commit_trans//...
2013 Jun 10
1
[PATCH v2] ocfs2: fix mutex_unlock and possible memory leak in ocfs2_remove_btree_range
...mlog_errno(ret); - goto out; + goto bail; } } @@ -5674,7 +5674,7 @@ int ocfs2_remove_btree_range(struct inode *inode, extra_blocks); if (ret) { mlog_errno(ret); - return ret; + goto bail; } mutex_lock(&tl_inode->i_mutex); @@ -5734,7 +5734,7 @@ out_commit: ocfs2_commit_trans(osb, handle); out: mutex_unlock(&tl_inode->i_mutex); - +bail: if (meta_ac) ocfs2_free_alloc_context(meta_ac); -- 1.7.9.7
2013 Mar 11
1
[PATCH 1/2] ocfs2: Delay inode update transactions after verifying the input flags
..._CREDITS); + if (IS_ERR(handle)) { + status = PTR_ERR(handle); + mlog_errno(status); + goto bail_unlock; } ocfs2_inode->ip_attr = flags; @@ -130,8 +130,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, if (status < 0) mlog_errno(status); -bail_commit: ocfs2_commit_trans(osb, handle); + bail_unlock: ocfs2_inode_unlock(inode, 1); bail: -- 1.7.9.5
2023 Apr 30
2
[PATCH 1/2] ocfs2: fix missing reset j_num_trans for sync
...md5sum to verify target file. Line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. This case is hanging at line 65. The md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. But there is only ->j_num_trans+1 in ocfs2_start_trans, the ocfs2_commit_trans doesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered. call flow: ``` [md5sum] //line 53 54 vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num...
2009 Feb 26
1
[PATCH 0/7] OCFS2 locking fixes and lockdep annotations
Hi, the first four patches in this series fix locking problems in OCFS2 quota code (three of them can lead to potential deadlocks). The fifth patch reorders ip_alloc_sem for directories to be acquired before localalloc locks. Mark would you please merge these? The last two patches implement lockdep annotations for OCFS2 cluster locks. We annotate all the cluster locks except for special ones
2013 Nov 22
0
[PATCH Resend] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
...free) { + if (data_ac->ac_which == OCFS2_AC_USE_LOCAL) + ocfs2_free_local_alloc_bits(osb, handle, data_ac, + bit_off, num); + else + ocfs2_free_clusters(handle, + data_ac->ac_inode, + data_ac->ac_bh, + ocfs2_clusters_to_blocks(osb->sb, bit_off), + num); + } + ocfs2_commit_trans(osb, handle); out_unlock: diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index cd5496b..25ec3b7 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -781,6 +781,46 @@ bail: return status; } +int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, + handle_t *han...
2008 Oct 20
0
[PATCH] ocfs2: Implement quota syncing thread
...e, &oinfo->dqi_gqi_bh, 1); + if (status < 0) + goto out; + + handle = ocfs2_start_trans(osb, OCFS2_QSYNC_CREDITS); + if (IS_ERR(handle)) { + status = PTR_ERR(handle); + mlog_errno(status); + goto out_ilock; + } + /* This also removes dquot from the list */ + ocfs2_sync_dquot(dquot); + ocfs2_commit_trans(osb, handle); +out_ilock: + brelse(oinfo->dqi_gqi_bh); + oinfo->dqi_gqi_bh = NULL; + ocfs2_inode_unlock(oinfo->dqi_gqinode, 1); +out: + mlog_exit(status); + return status; +} + +static void ocfs2_do_qsync(unsigned long oinfo_ptr) +{ + struct ocfs2_mem_dqinfo *oinfo = (struct ocfs2_mem_dqin...
2013 Nov 21
1
[PATCH] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
...free) { + if (data_ac->ac_which == OCFS2_AC_USE_LOCAL) + ocfs2_free_local_alloc_bits(osb, handle, data_ac, + bit_off, num); + else + ocfs2_free_clusters(handle, + data_ac->ac_inode, + data_ac->ac_bh, + ocfs2_clusters_to_blocks(osb->sb, bit_off), + num); + } + ocfs2_commit_trans(osb, handle); out_unlock: diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index cd5496b..25ec3b7 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -781,6 +781,46 @@ bail: return status; } +int ocfs2_free_local_alloc_bits(struct ocfs2_super *osb, + handle_t *han...
2013 Sep 03
1
[PATCH V3 RESENT] ocfs2: lighten up allocate transaction
...iggers { struct jbd2_buffer_trigger_type ot_triggers; int ot_offset; diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 96f9ac2..4ee41bb 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@ -258,6 +258,17 @@ handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int ocfs2_commit_trans(struct ocfs2_super *osb, handle_t *handle); int ocfs2_extend_trans(handle_t *handle, int nblocks); +int ocfs2_allocate_extend_trans(handle_t *handle, + int thresh); + +/* + * Define an arbitrary limit for the amount of data we will anticipate + * writing to any given tran...
2009 Mar 27
42
[PATCH 00/42] ocfs2: Add reflink file support. V1
Hi all, So I have finally finished the v1 of reflink for ocfs2. It has some bugs that I am still investigating, but the schema is almost there. So I'd like to send it out first for review. And Tristan and I will continue to work on the stability of the code. The general information for reflink, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/Reflink. For the design doc, please
2008 Dec 22
56
[git patches] Ocfs2 patches for merge window, batch 2/3
Hi, This is the second batch of Ocfs2 patches intended for the merge window. The 1st batch were sent out previously: http://lkml.org/lkml/2008/12/19/280 The bulk of this set is comprised of Jan Kara's patches to add quota support to Ocfs2. Many of the quota patches are to generic code, which I carried to make merging of the Ocfs2 support easier. All of the non-ocfs2 patches should have
2009 Apr 03
42
[PATCH 00/42] ocfs2: Add reflink file support. V2
Hi all, Change from v1 to v2: bug fix and metadata/credits reservation improvement. The general information for reflink, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/Reflink. For the design doc, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/RefcountTrees http://oss.oracle.com/osswiki/OCFS2/DesignDocs/ReflinkOperation
2009 Apr 30
42
[PATCH 00/39] ocfs2: Add reflink file support. V3
Hi all, So I have finally finished the v3 of reflink for ocfs2. The biggest change is that we support 64bit cluster offset now(Thank Mark and Joel for it). [View] http://oss.oracle.com/git/?p=tma/linux-2.6.git;a=shortlog;h=refcount [Pull] git://oss.oracle.com/git/tma/linux-2.6.git refcount The general information for reflink, please see http://oss.oracle.com/osswiki/OCFS2/DesignDocs/Reflink.
2009 Jul 13
1
[PATCH 1/1] adds mlogs to aops.c
...OCFS2_SB(inode->i_sb); handle_t *handle; int ret = 0; + mlog_entry("(%llu, 0x%p, %u, %u)\n", + OCFS2_I(inode)->ip_blkno, page, from, to); + handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); if (IS_ERR(handle)) { ret = -ENOMEM; @@ -484,6 +513,8 @@ out: ocfs2_commit_trans(osb, handle); handle = ERR_PTR(ret); } + + mlog_exit_ptr(handle); return handle; } @@ -494,7 +525,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) int err = 0; struct inode *inode = mapping->host; - mlog_entry("(block = %llu)\n", (unsigned...
2009 Jul 21
1
(no subject)
..._sb); handle_t *handle; int ret = 0; + mlog_entry("(%llu, 0x%p, %u, %u)\n", + (unsigned long long)OCFS2_I(inode)->ip_blkno, page, from, to); + handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); if (IS_ERR(handle)) { ret = -ENOMEM; @@ -484,6 +516,8 @@ out: ocfs2_commit_trans(osb, handle); handle = ERR_PTR(ret); } + + mlog_exit_ptr(handle); return handle; } @@ -494,7 +528,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) int err = 0; struct inode *inode = mapping->host; - mlog_entry("(block = %llu)\n", (unsigned...
2008 Oct 23
2
[PATCH 1/1] OCFS2: fix for nfs getting stale inode.
...ex: fs/ocfs2/inode.c =================================================================== --- fs/ocfs2/inode.c (revision 3101) +++ fs/ocfs2/inode.c (working copy) @@ -533,7 +533,9 @@ static int ocfs2_remove_inode(struct ino mlog_errno(status); bail_commit: + ocfs2_handle_set_sync(handle, 1); ocfs2_commit_trans(handle); + ocfs2_checkpoint_inode(inode); bail_unlock: ocfs2_meta_unlock(inode_alloc_inode, 1); mutex_unlock(&inode_alloc_inode->i_mutex); @@ -829,6 +831,16 @@ void ocfs2_delete_inode(struct inode *in goto bail; } + /* prevents reading this disk block during the vote + * and di...
2009 Jun 02
10
[PATCH 0/7] [RESEND] Fix some deadlocks in quota code and implement lockdep for cluster locks
Hi, I'm resending this patch series. It's rediffed against linux-next branch of Joel's git tree. The first four patches are obvious fixes of deadlocks in quota code and should go in as soon as possible. The other three patches implement lockdep support for OCFS2 cluster locks. So you can have a look whether the code make sence to you and possibly merge them. They should be NOP when
2009 Jun 18
8
Patches backported from mainline
All, Please review the patches backported to 1.4 from mainline. Sunil