diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 12:01:28 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 12:01:28 -0500 |
commit | 9db73724453a9350e1c22dbe732d427e2939a5c9 (patch) | |
tree | 15e3ead6413ae97398a54292acc199bee0864d42 /fs/ocfs2/super.c | |
parent | 4c1ac1b49122b805adfa4efc620592f68dccf5db (diff) | |
parent | e62438630ca37539c8cc1553710bbfaa3cf960a7 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/ata/libata-scsi.c
include/linux/libata.h
Futher merge of Linus's head and compilation fixups.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 9a8089030f55..d9b4214a12da 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -70,8 +70,6 @@ | |||
70 | 70 | ||
71 | static kmem_cache_t *ocfs2_inode_cachep = NULL; | 71 | static kmem_cache_t *ocfs2_inode_cachep = NULL; |
72 | 72 | ||
73 | kmem_cache_t *ocfs2_lock_cache = NULL; | ||
74 | |||
75 | /* OCFS2 needs to schedule several differnt types of work which | 73 | /* OCFS2 needs to schedule several differnt types of work which |
76 | * require cluster locking, disk I/O, recovery waits, etc. Since these | 74 | * require cluster locking, disk I/O, recovery waits, etc. Since these |
77 | * types of work tend to be heavy we avoid using the kernel events | 75 | * types of work tend to be heavy we avoid using the kernel events |
@@ -141,6 +139,7 @@ enum { | |||
141 | Opt_hb_local, | 139 | Opt_hb_local, |
142 | Opt_data_ordered, | 140 | Opt_data_ordered, |
143 | Opt_data_writeback, | 141 | Opt_data_writeback, |
142 | Opt_atime_quantum, | ||
144 | Opt_err, | 143 | Opt_err, |
145 | }; | 144 | }; |
146 | 145 | ||
@@ -154,6 +153,7 @@ static match_table_t tokens = { | |||
154 | {Opt_hb_local, OCFS2_HB_LOCAL}, | 153 | {Opt_hb_local, OCFS2_HB_LOCAL}, |
155 | {Opt_data_ordered, "data=ordered"}, | 154 | {Opt_data_ordered, "data=ordered"}, |
156 | {Opt_data_writeback, "data=writeback"}, | 155 | {Opt_data_writeback, "data=writeback"}, |
156 | {Opt_atime_quantum, "atime_quantum=%u"}, | ||
157 | {Opt_err, NULL} | 157 | {Opt_err, NULL} |
158 | }; | 158 | }; |
159 | 159 | ||
@@ -707,6 +707,7 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
707 | while ((p = strsep(&options, ",")) != NULL) { | 707 | while ((p = strsep(&options, ",")) != NULL) { |
708 | int token, option; | 708 | int token, option; |
709 | substring_t args[MAX_OPT_ARGS]; | 709 | substring_t args[MAX_OPT_ARGS]; |
710 | struct ocfs2_super * osb = OCFS2_SB(sb); | ||
710 | 711 | ||
711 | if (!*p) | 712 | if (!*p) |
712 | continue; | 713 | continue; |
@@ -747,6 +748,16 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
747 | case Opt_data_writeback: | 748 | case Opt_data_writeback: |
748 | *mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; | 749 | *mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; |
749 | break; | 750 | break; |
751 | case Opt_atime_quantum: | ||
752 | if (match_int(&args[0], &option)) { | ||
753 | status = 0; | ||
754 | goto bail; | ||
755 | } | ||
756 | if (option >= 0) | ||
757 | osb->s_atime_quantum = option; | ||
758 | else | ||
759 | osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; | ||
760 | break; | ||
750 | default: | 761 | default: |
751 | mlog(ML_ERROR, | 762 | mlog(ML_ERROR, |
752 | "Unrecognized mount option \"%s\" " | 763 | "Unrecognized mount option \"%s\" " |
@@ -867,7 +878,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
867 | goto bail; | 878 | goto bail; |
868 | } | 879 | } |
869 | 880 | ||
870 | status = ocfs2_meta_lock(inode, NULL, &bh, 0); | 881 | status = ocfs2_meta_lock(inode, &bh, 0); |
871 | if (status < 0) { | 882 | if (status < 0) { |
872 | mlog_errno(status); | 883 | mlog_errno(status); |
873 | goto bail; | 884 | goto bail; |
@@ -914,9 +925,7 @@ static void ocfs2_inode_init_once(void *data, | |||
914 | oi->ip_open_count = 0; | 925 | oi->ip_open_count = 0; |
915 | spin_lock_init(&oi->ip_lock); | 926 | spin_lock_init(&oi->ip_lock); |
916 | ocfs2_extent_map_init(&oi->vfs_inode); | 927 | ocfs2_extent_map_init(&oi->vfs_inode); |
917 | INIT_LIST_HEAD(&oi->ip_handle_list); | ||
918 | INIT_LIST_HEAD(&oi->ip_io_markers); | 928 | INIT_LIST_HEAD(&oi->ip_io_markers); |
919 | oi->ip_handle = NULL; | ||
920 | oi->ip_created_trans = 0; | 929 | oi->ip_created_trans = 0; |
921 | oi->ip_last_trans = 0; | 930 | oi->ip_last_trans = 0; |
922 | oi->ip_dir_start_lookup = 0; | 931 | oi->ip_dir_start_lookup = 0; |
@@ -948,14 +957,6 @@ static int ocfs2_initialize_mem_caches(void) | |||
948 | if (!ocfs2_inode_cachep) | 957 | if (!ocfs2_inode_cachep) |
949 | return -ENOMEM; | 958 | return -ENOMEM; |
950 | 959 | ||
951 | ocfs2_lock_cache = kmem_cache_create("ocfs2_lock", | ||
952 | sizeof(struct ocfs2_journal_lock), | ||
953 | 0, | ||
954 | SLAB_HWCACHE_ALIGN, | ||
955 | NULL, NULL); | ||
956 | if (!ocfs2_lock_cache) | ||
957 | return -ENOMEM; | ||
958 | |||
959 | return 0; | 960 | return 0; |
960 | } | 961 | } |
961 | 962 | ||
@@ -963,11 +964,8 @@ static void ocfs2_free_mem_caches(void) | |||
963 | { | 964 | { |
964 | if (ocfs2_inode_cachep) | 965 | if (ocfs2_inode_cachep) |
965 | kmem_cache_destroy(ocfs2_inode_cachep); | 966 | kmem_cache_destroy(ocfs2_inode_cachep); |
966 | if (ocfs2_lock_cache) | ||
967 | kmem_cache_destroy(ocfs2_lock_cache); | ||
968 | 967 | ||
969 | ocfs2_inode_cachep = NULL; | 968 | ocfs2_inode_cachep = NULL; |
970 | ocfs2_lock_cache = NULL; | ||
971 | } | 969 | } |
972 | 970 | ||
973 | static int ocfs2_get_sector(struct super_block *sb, | 971 | static int ocfs2_get_sector(struct super_block *sb, |
@@ -1280,6 +1278,8 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1280 | init_waitqueue_head(&osb->checkpoint_event); | 1278 | init_waitqueue_head(&osb->checkpoint_event); |
1281 | atomic_set(&osb->needs_checkpoint, 0); | 1279 | atomic_set(&osb->needs_checkpoint, 0); |
1282 | 1280 | ||
1281 | osb->s_atime_quantum = OCFS2_DEFAULT_ATIME_QUANTUM; | ||
1282 | |||
1283 | osb->node_num = O2NM_INVALID_NODE_NUM; | 1283 | osb->node_num = O2NM_INVALID_NODE_NUM; |
1284 | osb->slot_num = OCFS2_INVALID_SLOT; | 1284 | osb->slot_num = OCFS2_INVALID_SLOT; |
1285 | 1285 | ||