search for: ocfs2_inode_lock

Displaying 20 results from an estimated 36 matches for "ocfs2_inode_lock".

Did you mean: ocfs2_inode_unlock
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&g...
2009 Jun 19
2
[PATCH] ocfs2: Update atime in splice read if necessary.
We should call ocfs2_inode_lock_atime instead of ocfs2_inode_lock in ocfs2_file_splice_read like we do in ocfs2_file_aio_read so that we can update atime in splice read if necessary. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/file.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git...
2009 Jan 12
1
Bug in inode deletion code leading to stale inodes
...00405 because it is in use on other nodes The scenario which I think is happening is as follows: node1 node2 rmdir("d"); ocfs2_remote_dentry_delete() ocfs2_dentry_convert_worker() finishes ocfs2_unlink() eventually enters ocfs2_delete_inode() ocfs2_inode_lock() ocfs2_query_inode_wipe() -> fail ocfs2_inode_unlock() ocfs2_dentry_post_unlock() ocfs2_drop_dentry_lock() iput() ocfs2_delete_inode() ocfs2_inode_lock() ocfs2_query_inode_wipe() -> fail ocfs2_inode_unlock() clear_inode() cl...
2009 Jun 04
2
[PATCH 0/2] OCFS2 lockdep support
Hi, here comes the next version of OCFS2 lockdep support. I've dropped patches with fixes from the series since they were already merged. As Joel suggested, I've simplified the main patch a bit so that we don't have ifdefs around lock declarations and there are also a few other minor improvements. Honza
2011 May 26
5
[PATCH 0/4] ocfs2: bugfix for hard readonly mount
...2 on hard readonly device. Because ocfs2_open_lock() will call ocfs2_cluster_lock() and then call ocfs2_dlm_lock(), but active_stack is NULL. patch 3 fix bug of http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322 ocfs2_statfs, ocfs2_fiemap, ocfs2_get_acl, ocfs2_listxattr and ocfs2_xattr_get need ocfs2_inode_lock to get dinode buffer head, but on hard readonly mount, they did not get they expected, so lead to oops. ocfs2_init_security_and_acl and ocfs2_test_inode_bit also called ocfs2_inode_lock(inode, &bh, 0), but they are safe, because ocfs2_reflink and ocfs2_get_dentry check hard read only befo...
2013 Jun 20
2
[PATCH] ocfs2: llseek requires to ocfs2 inode lock for the file in SEEK_END
...s2/file.c +++ b/fs/ocfs2/file.c @@ -2626,7 +2626,16 @@ static loff_t ocfs2_file_llseek(struct file *file, loff_t offset, int whence) case SEEK_SET: break; case SEEK_END: + /* SEEK_END requires the OCFS2 inode lock for the file + * because it references the file's size. + */ + ret = ocfs2_inode_lock(inode, NULL, 0); + if (ret < 0) { + mlog_errno(ret); + goto out; + } offset += inode->i_size; + ocfs2_inode_unlock(inode, 0); break; case SEEK_CUR: if (offset == 0) { -- 1.7.9.7
2008 Sep 22
1
[PATCH 1/1] OCFS2: add nlink check in ocfs2_inode_revalidate()
...2_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
2009 Aug 18
15
dlm stress test hangs OCFS2
This email is also sent to cluster-devel at redhat.com. Since this issue is about both dlm and ocfs2, I send the email here to look for help from upstream. This is an already known issue. on ocfs2 with user space cluster stack, run the test script from http://people.redhat.com/~teigland/make_panic on the mounted ocfs2 volume from 2 nodes simultaneously, the access to ocfs2 volume on both nodes
2010 Oct 09
2
[PATCH 1/2] Ocfs2: Add a mount option "coherency=*" for O_DIRECT writes.
Currently, default behavior of O_DIRECT writes was allowing concurrent writing among nodes, no cluster coherency guaranteed (no EX locks was taken), it hurts buffered reads on other nodes by reading stale data from cache. The new mount option introduce a chance to choose two different behaviors for O_DIRECT writes: * coherency=full, as the default value, will disallow concurrent
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
2010 Nov 03
2
[PATCH 1/2] Ocfs2: Add a new code 'OCFS2_INFO_FREEINODE' for o2info ioctl.
...e_alloc, + struct ocfs2_info_freeinode *fi, __u32 slot) +{ + int status = 0, unlock = 0; + + struct buffer_head *bh = NULL; + struct ocfs2_dinode *dinode_alloc = NULL; + + mutex_lock(&inode_alloc->i_mutex); + + if (!(fi->ifi_req.ir_flags & OCFS2_INFO_FL_NON_COHERENT)) { + status = ocfs2_inode_lock(inode_alloc, &bh, 0); + if (status < 0) { + mlog_errno(status); + goto bail; + } + unlock = 1; + + } else { + status = ocfs2_read_inode_block(inode_alloc, &bh); + if (status < 0) { + mlog_errno(status); + goto bail; + } + } + + dinode_alloc = (struct ocfs2_dinode *)bh-&g...
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
2013 Jun 27
0
[PATCH V3] ocfs2: llseek requires to ocfs2 inode lock for the file in SEEK_END
...@@ -2626,7 +2626,16 @@ static loff_t ocfs2_file_llseek(struct file *file, loff_t offset, int whence) case SEEK_SET: break; case SEEK_END: - offset += inode->i_size; + /* SEEK_END requires the OCFS2 inode lock for the file + * because it references the file's size. + */ + ret = ocfs2_inode_lock(inode, NULL, 0); + if (ret < 0) { + mlog_errno(ret); + goto out; + } + offset += i_size_read(inode); + ocfs2_inode_unlock(inode, 0); break; case SEEK_CUR: if (offset == 0) { -- 1.7.9.7
2013 Jun 28
1
[PATCH V3] ocfs2: xattr: fix inlined xattr reflink
Inlined xattr shared free space of inode block with inlined data or data extent record, so the size of the later two should be adjusted when inlined xattr is enabled. See ocfs2_xattr_ibody_init(). But this isn't done well when reflink. For inode with inlined data, its max inlined data size is adjusted in ocfs2_duplicate_inline_data(), no problem. But for inode with data extent record, its
2011 Mar 07
4
[PATCH 0/3] ocfs2: Add batched discard support
Hi all, This patch set adds batched discard support to ocfs2. Please check. Thanks. Regards, Tao
2008 Oct 20
0
[PATCH] ocfs2: Implement quota syncing thread
...s2_mem_dqinfo *oinfo = sb_dqinfo(sb, type)->dqi_priv; + struct ocfs2_super *osb = OCFS2_SB(sb); + int status = 0; + + mlog_entry("id=%u qtype=%u type=%lu device=%s\n", dquot->dq_id, + dquot->dq_type, type, sb->s_id); + if (type != dquot->dq_type) + goto out; + status = ocfs2_inode_lock(oinfo->dqi_gqinode, &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_...
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2011 May 19
3
SEEK_DATA/HOLE on ocfs2 - v2
Two patches follow this message. One fixes the default implementation of SEEK_HOLE/DATA. This patch applies atop Josef's last posted patch. The second patch implements the same on ocfs2. The test tool for the same is available here. http://oss.oracle.com/~smushran/seek_data/seek_test.c It is improved since the last post. It runs cleanly on zfs, ocfs2 and ext3 (default behavior). Users
2008 Oct 17
3
[PATCH 0/3] ocfs2: add security EA and ACL support v3
Hi, These three patches fix the problems in the version two. And them base on the Tao's patches: ocfs2/xattr: xattr improvement The first patch fix some problem in xattr code. The second patch add security EA support. The third patch add ACL support. Best regards, tiger
2009 Feb 17
1
[PATCH 1/1] OCFS2: anti stale inode for nfs (V3)
...de(osb, INODE_ALLOC_SYSTEM_INODE, + suballoc_slot); + if (!inode_alloc_inode) { + status = -EEXIST; + mlog(ML_ERROR, "unable to get alloc inode in slot %u\n", + (u32)suballoc_slot); + goto unlock_nfs_sync; + } + + mutex_lock(&inode_alloc_inode->i_mutex); + status = ocfs2_inode_lock(inode_alloc_inode, &alloc_bh, 0); + if (status < 0) { + mlog(ML_ERROR, "lock on alloc inode on slot %u failed %d\n", + (u32)suballoc_slot, status); + goto unlock_mutex; + } + status = ocfs2_test_suballoc_bit(osb, inode_alloc_inode, alloc_bh, + blkno, suballoc_bit, &amp...