aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 12:29:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 12:29:20 -0400
commitb64ada6b23d4a305fb3ca59b79dd38707fc53b69 (patch)
tree61bc87dc3a2549f54231261aaa544acffcd12281 /fs/ocfs2/super.c
parentbe90a49ca22a95f184d9f32d35b5247b44032849 (diff)
parentb80474b432913f73cce8db001e9fa3104f9b79ee (diff)
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (85 commits) ocfs2: Use buffer IO if we are appending a file. ocfs2: add spinlock protection when dealing with lockres->purge. dlmglue.c: add missed mlog lines ocfs2: __ocfs2_abort() should not enable panic for local mounts ocfs2: Add ioctl for reflink. ocfs2: Enable refcount tree support. ocfs2: Implement ocfs2_reflink. ocfs2: Add preserve to reflink. ocfs2: Create reflinked file in orphan dir. ocfs2: Use proper parameter for some inode operation. ocfs2: Make transaction extend more efficient. ocfs2: Don't merge in 1st refcount ops of reflink. ocfs2: Modify removing xattr process for refcount. ocfs2: Add reflink support for xattr. ocfs2: Create an xattr indexed block if needed. ocfs2: Call refcount tree remove process properly. ocfs2: Attach xattr clusters to refcount tree. ocfs2: Abstract ocfs2 xattr tree extend rec iteration process. ocfs2: Abstract the creation of xattr block. ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value. ...
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index faca4720aa47..24feb449a1dc 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -69,6 +69,7 @@
69#include "ver.h" 69#include "ver.h"
70#include "xattr.h" 70#include "xattr.h"
71#include "quota.h" 71#include "quota.h"
72#include "refcounttree.h"
72 73
73#include "buffer_head_io.h" 74#include "buffer_head_io.h"
74 75
@@ -1668,8 +1669,6 @@ static void ocfs2_inode_init_once(void *data)
1668 spin_lock_init(&oi->ip_lock); 1669 spin_lock_init(&oi->ip_lock);
1669 ocfs2_extent_map_init(&oi->vfs_inode); 1670 ocfs2_extent_map_init(&oi->vfs_inode);
1670 INIT_LIST_HEAD(&oi->ip_io_markers); 1671 INIT_LIST_HEAD(&oi->ip_io_markers);
1671 oi->ip_created_trans = 0;
1672 oi->ip_last_trans = 0;
1673 oi->ip_dir_start_lookup = 0; 1672 oi->ip_dir_start_lookup = 0;
1674 1673
1675 init_rwsem(&oi->ip_alloc_sem); 1674 init_rwsem(&oi->ip_alloc_sem);
@@ -1683,7 +1682,8 @@ static void ocfs2_inode_init_once(void *data)
1683 ocfs2_lock_res_init_once(&oi->ip_inode_lockres); 1682 ocfs2_lock_res_init_once(&oi->ip_inode_lockres);
1684 ocfs2_lock_res_init_once(&oi->ip_open_lockres); 1683 ocfs2_lock_res_init_once(&oi->ip_open_lockres);
1685 1684
1686 ocfs2_metadata_cache_init(&oi->vfs_inode); 1685 ocfs2_metadata_cache_init(INODE_CACHE(&oi->vfs_inode),
1686 &ocfs2_inode_caching_ops);
1687 1687
1688 inode_init_once(&oi->vfs_inode); 1688 inode_init_once(&oi->vfs_inode);
1689} 1689}
@@ -1859,6 +1859,8 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
1859 1859
1860 ocfs2_sync_blockdev(sb); 1860 ocfs2_sync_blockdev(sb);
1861 1861
1862 ocfs2_purge_refcount_trees(osb);
1863
1862 /* No cluster connection means we've failed during mount, so skip 1864 /* No cluster connection means we've failed during mount, so skip
1863 * all the steps which depended on that to complete. */ 1865 * all the steps which depended on that to complete. */
1864 if (osb->cconn) { 1866 if (osb->cconn) {
@@ -2065,6 +2067,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
2065 goto bail; 2067 goto bail;
2066 } 2068 }
2067 2069
2070 osb->osb_rf_lock_tree = RB_ROOT;
2071
2068 osb->s_feature_compat = 2072 osb->s_feature_compat =
2069 le32_to_cpu(OCFS2_RAW_SB(di)->s_feature_compat); 2073 le32_to_cpu(OCFS2_RAW_SB(di)->s_feature_compat);
2070 osb->s_feature_ro_compat = 2074 osb->s_feature_ro_compat =
@@ -2490,7 +2494,8 @@ void __ocfs2_abort(struct super_block* sb,
2490 /* Force a panic(). This stinks, but it's better than letting 2494 /* Force a panic(). This stinks, but it's better than letting
2491 * things continue without having a proper hard readonly 2495 * things continue without having a proper hard readonly
2492 * here. */ 2496 * here. */
2493 OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC; 2497 if (!ocfs2_mount_local(OCFS2_SB(sb)))
2498 OCFS2_SB(sb)->s_mount_opt |= OCFS2_MOUNT_ERRORS_PANIC;
2494 ocfs2_handle_error(sb); 2499 ocfs2_handle_error(sb);
2495} 2500}
2496 2501