search for: ip_lock

Displaying 16 results from an estimated 16 matches for "ip_lock".

Did you mean: qp_lock
2009 Apr 08
0
[PATCH] ocfs2: Hold ip_lock when set/clear flags for indexed dir.
When we set/clear the dyn_features for an inode we hold the ip_lock. So do it when we set/clear OCFS2_INDEXED_DIR_FL also. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/dir.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 07d8920..8e0f370 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs...
2008 Sep 22
1
[PATCH 1/1] OCFS2: add nlink check in ocfs2_inode_revalidate()
...-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
2008 Sep 22
0
[PATCH 1/1] OCFS2: add validation in ocfs2_get_dentry()
...e; + struct ocfs2_inode_info *oi = NULL; struct dentry *result; mlog_entry("(0x%p, 0x%p)\n", sb, handle); @@ -68,6 +69,17 @@ static struct dentry *ocfs2_get_dentry(struct super_block *sb, void *vobjp) return ERR_PTR(-ESTALE); } + oi = OCFS2_I(inode); + + spin_lock(&oi->ip_lock); + if ((OCFS2_I(inode)->ip_flags & OCFS2_INODE_DELETED) + || !inode->i_nlink) { + spin_unlock(&oi->ip_lock); + iput(inode); + return ERR_PTR(-ESTALE); + } + spin_unlock(&oi->ip_lock); + result = d_alloc_anon(inode); if (!result) {
2013 Jun 28
1
[PATCH V3] ocfs2: xattr: fix inlined xattr reflink
...dyn_features & OCFS2_INLINE_DATA_FL) && + !(ocfs2_inode_is_fast_symlink(args->new_inode))) { + struct ocfs2_extent_list *el = &new_di->id2.i_list; + le16_add_cpu(&el->l_count, -(inline_size / + sizeof(struct ocfs2_extent_rec))); + } spin_lock(&new_oi->ip_lock); new_oi->ip_dyn_features |= OCFS2_HAS_XATTR_FL | OCFS2_INLINE_XATTR_FL; new_di->i_dyn_features = cpu_to_le16(new_oi->ip_dyn_features); -- 1.7.9.5
2006 Dec 29
3
[git patches] ocfs2 fixes
...>> inode->i_blkbits; @@ -550,12 +549,23 @@ static int ocfs2_direct_IO_get_blocks(st * nicely aligned and of the right size, so there's no need * for us to check any of that. */ - vbo_max = ((u64)iblock + max_blocks) << blocksize_bits; - spin_lock(&OCFS2_I(inode)->ip_lock); - if ((iblock + max_blocks) > - ocfs2_clusters_to_blocks(inode->i_sb, - OCFS2_I(inode)->ip_clusters)) { + inode_blocks = ocfs2_clusters_to_blocks(inode->i_sb, + OCFS2_I(inode)->ip_clusters); + + /* + * For a read which begins past the end of file, we return a hole...
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
2007 May 17
1
[PATCH] ocfs: use list_for_each_entry where benefical
...ned int cpos) { - struct list_head *p, *n; - struct ocfs2_extent_map_item *emi; + struct ocfs2_extent_map_item *emi, *n; struct ocfs2_inode_info *oi = OCFS2_I(inode); struct ocfs2_extent_map *em = &oi->ip_extent_map; LIST_HEAD(tmp_list); unsigned int range; spin_lock(&oi->ip_lock); - list_for_each_safe(p, n, &em->em_list) { - emi = list_entry(p, struct ocfs2_extent_map_item, ei_list); - + list_for_each_entry_safe(emi, n, &em->em_list, ei_list) { if (emi->ei_cpos >= cpos) { /* Full truncate of this record. */ list_move(&emi->ei_list, &a...
2009 Mar 31
0
[PATCH] ocfs2: remove some pointless conditionals before kfree()
...- kfree(buf); - if (item) - kfree(item); + kfree(buf); + kfree(item); } mlog_exit(ret); diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c index f2bb1a0..7640858 100644 --- a/fs/ocfs2/extent_map.c +++ b/fs/ocfs2/extent_map.c @@ -280,8 +280,7 @@ search: spin_unlock(&oi->ip_lock); out: - if (new_emi) - kfree(new_emi); + kfree(new_emi); } static int ocfs2_last_eb_is_empty(struct inode *inode, diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 57d7d25..195af61 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -1150,11 +1150,9 @@ static void ocfs2_qu...
2008 Oct 15
1
[PATCH] ocfs2: Wrap inode block reads in a dedicated function.
...pulate_inode(inode, fe, 0) < 0) > - goto bail; > + ocfs2_populate_inode(inode, fe, 0); > > BUG_ON(args->fi_blkno != le64_to_cpu(fe->i_blkno)); > > @@ -1258,3 +1243,66 @@ void ocfs2_refresh_inode(struct inode *inode, > > spin_unlock(&OCFS2_I(inode)->ip_lock); > } > + > +int ocfs2_validate_inode_block(struct super_block *sb, > + struct buffer_head *bh) > +{ > + int rc = -EINVAL; > + struct ocfs2_dinode *di = (struct ocfs2_dinode *)bh->b_data; > + > + BUG_ON(!buffer_uptodate(bh)); > + > + if (!OCFS2_IS_VALID...
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
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.
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 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
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
2008 Apr 02
10
[PATCH 0/62] Ocfs2 updates for 2.6.26-rc1
The following series of patches comprises the bulk of our outstanding changes for Ocfs2. Aside from the usual set of cleanups and fixes that were inappropriate for 2.6.25, there are a few highlights: The '/sys/o2cb' directory has been moved to '/sys/fs/o2cb'. The new location meshes better with modern sysfs layout. A symbolic link has been placed in the old location so as to