aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 19:45:56 -0500
commit992de5a8eca7cbd3215e3eb2c439b2c11582a58b (patch)
tree863988f84c1dd57a02fa337ecbce49263a3b9511 /fs/ocfs2
parentb2718bffb4088faf13092db30c1ebf088ddee52e (diff)
parentd5b3cf7139b8770af4ed8bb36a1ab9d290ac39e9 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc updates from Andrew Morton: "Bite-sized chunks this time, to avoid the MTA ratelimiting woes. - fs/notify updates - ocfs2 - some of MM" That laconic "some MM" is mainly the removal of remap_file_pages(), which is a big simplification of the VM, and which gets rid of a *lot* of random cruft and special cases because we no longer support the non-linear mappings that it used. From a user interface perspective, nothing has changed, because the remap_file_pages() syscall still exists, it's just done by emulating the old behavior by creating a lot of individual small mappings instead of one non-linear one. The emulation is slower than the old "native" non-linear mappings, but nobody really uses or cares about remap_file_pages(), and simplifying the VM is a big advantage. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (78 commits) memcg: zap memcg_slab_caches and memcg_slab_mutex memcg: zap memcg_name argument of memcg_create_kmem_cache memcg: zap __memcg_{charge,uncharge}_slab mm/page_alloc.c: place zone_id check before VM_BUG_ON_PAGE check mm: hugetlb: fix type of hugetlb_treat_as_movable variable mm, hugetlb: remove unnecessary lower bound on sysctl handlers"? mm: memory: merge shared-writable dirtying branches in do_wp_page() mm: memory: remove ->vm_file check on shared writable vmas xtensa: drop _PAGE_FILE and pte_file()-related helpers x86: drop _PAGE_FILE and pte_file()-related helpers unicore32: drop pte_file()-related helpers um: drop _PAGE_FILE and pte_file()-related helpers tile: drop pte_file()-related helpers sparc: drop pte_file()-related helpers sh: drop _PAGE_FILE and pte_file()-related helpers score: drop _PAGE_FILE and pte_file()-related helpers s390: drop pte_file()-related helpers parisc: drop _PAGE_FILE and pte_file()-related helpers openrisc: drop _PAGE_FILE and pte_file()-related helpers nios2: drop _PAGE_FILE and pte_file()-related helpers ...
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/acl.c14
-rw-r--r--fs/ocfs2/alloc.c18
-rw-r--r--fs/ocfs2/cluster/tcp.c3
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h12
-rw-r--r--fs/ocfs2/dir.c10
-rw-r--r--fs/ocfs2/dlm/dlmast.c6
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c4
-rw-r--r--fs/ocfs2/dlm/dlmdomain.c14
-rw-r--r--fs/ocfs2/dlm/dlmdomain.h1
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c7
-rw-r--r--fs/ocfs2/dlmglue.c3
-rw-r--r--fs/ocfs2/file.c2
-rw-r--r--fs/ocfs2/journal.c1
-rw-r--r--fs/ocfs2/mmap.c1
-rw-r--r--fs/ocfs2/ocfs2.h2
-rw-r--r--fs/ocfs2/quota_local.c6
-rw-r--r--fs/ocfs2/refcounttree.c2
-rw-r--r--fs/ocfs2/reservations.c2
-rw-r--r--fs/ocfs2/super.c17
-rw-r--r--fs/ocfs2/xattr.c10
20 files changed, 64 insertions, 71 deletions
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index 7e8282dcea2a..c58a1bcfda0f 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -245,16 +245,14 @@ int ocfs2_set_acl(handle_t *handle,
245 ret = posix_acl_equiv_mode(acl, &mode); 245 ret = posix_acl_equiv_mode(acl, &mode);
246 if (ret < 0) 246 if (ret < 0)
247 return ret; 247 return ret;
248 else {
249 if (ret == 0)
250 acl = NULL;
251 248
252 ret = ocfs2_acl_set_mode(inode, di_bh, 249 if (ret == 0)
253 handle, mode); 250 acl = NULL;
254 if (ret)
255 return ret;
256 251
257 } 252 ret = ocfs2_acl_set_mode(inode, di_bh,
253 handle, mode);
254 if (ret)
255 return ret;
258 } 256 }
259 break; 257 break;
260 case ACL_TYPE_DEFAULT: 258 case ACL_TYPE_DEFAULT:
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index fcae9ef1a328..044158bd22be 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -6873,7 +6873,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,
6873 if (IS_ERR(handle)) { 6873 if (IS_ERR(handle)) {
6874 ret = PTR_ERR(handle); 6874 ret = PTR_ERR(handle);
6875 mlog_errno(ret); 6875 mlog_errno(ret);
6876 goto out_unlock; 6876 goto out;
6877 } 6877 }
6878 6878
6879 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, 6879 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh,
@@ -6931,7 +6931,7 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,
6931 if (ret) { 6931 if (ret) {
6932 mlog_errno(ret); 6932 mlog_errno(ret);
6933 need_free = 1; 6933 need_free = 1;
6934 goto out_commit; 6934 goto out_unlock;
6935 } 6935 }
6936 6936
6937 page_end = PAGE_CACHE_SIZE; 6937 page_end = PAGE_CACHE_SIZE;
@@ -6964,12 +6964,16 @@ int ocfs2_convert_inline_data_to_extents(struct inode *inode,
6964 if (ret) { 6964 if (ret) {
6965 mlog_errno(ret); 6965 mlog_errno(ret);
6966 need_free = 1; 6966 need_free = 1;
6967 goto out_commit; 6967 goto out_unlock;
6968 } 6968 }
6969 6969
6970 inode->i_blocks = ocfs2_inode_sector_count(inode); 6970 inode->i_blocks = ocfs2_inode_sector_count(inode);
6971 } 6971 }
6972 6972
6973out_unlock:
6974 if (pages)
6975 ocfs2_unlock_and_free_pages(pages, num_pages);
6976
6973out_commit: 6977out_commit:
6974 if (ret < 0 && did_quota) 6978 if (ret < 0 && did_quota)
6975 dquot_free_space_nodirty(inode, 6979 dquot_free_space_nodirty(inode,
@@ -6989,15 +6993,11 @@ out_commit:
6989 6993
6990 ocfs2_commit_trans(osb, handle); 6994 ocfs2_commit_trans(osb, handle);
6991 6995
6992out_unlock: 6996out:
6993 if (data_ac) 6997 if (data_ac)
6994 ocfs2_free_alloc_context(data_ac); 6998 ocfs2_free_alloc_context(data_ac);
6995 6999 if (pages)
6996out:
6997 if (pages) {
6998 ocfs2_unlock_and_free_pages(pages, num_pages);
6999 kfree(pages); 7000 kfree(pages);
7000 }
7001 7001
7002 return ret; 7002 return ret;
7003} 7003}
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 2e355e0f8335..56c403a563bc 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1016,7 +1016,8 @@ void o2net_fill_node_map(unsigned long *map, unsigned bytes)
1016 1016
1017 memset(map, 0, bytes); 1017 memset(map, 0, bytes);
1018 for (node = 0; node < O2NM_MAX_NODES; ++node) { 1018 for (node = 0; node < O2NM_MAX_NODES; ++node) {
1019 o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret); 1019 if (!o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret))
1020 continue;
1020 if (!ret) { 1021 if (!ret) {
1021 set_bit(node, map); 1022 set_bit(node, map);
1022 sc_put(sc); 1023 sc_put(sc);
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index dc024367110a..b95e7df5b76a 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -107,12 +107,12 @@ struct o2net_node {
107 struct list_head nn_status_list; 107 struct list_head nn_status_list;
108 108
109 /* connects are attempted from when heartbeat comes up until either hb 109 /* connects are attempted from when heartbeat comes up until either hb
110 * goes down, the node is unconfigured, no connect attempts succeed 110 * goes down, the node is unconfigured, or a connect succeeds.
111 * before O2NET_CONN_IDLE_DELAY, or a connect succeeds. connect_work 111 * connect_work is queued from set_nn_state both from hb up and from
112 * is queued from set_nn_state both from hb up and from itself if a 112 * itself if a connect attempt fails and so can be self-arming.
113 * connect attempt fails and so can be self-arming. shutdown is 113 * shutdown is careful to first mark the nn such that no connects will
114 * careful to first mark the nn such that no connects will be attempted 114 * be attempted before canceling delayed connect work and flushing the
115 * before canceling delayed connect work and flushing the queue. */ 115 * queue. */
116 struct delayed_work nn_connect_work; 116 struct delayed_work nn_connect_work;
117 unsigned long nn_last_connect_attempt; 117 unsigned long nn_last_connect_attempt;
118 118
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 319e786175af..b08050bd3f2e 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -3456,10 +3456,8 @@ static int ocfs2_find_dir_space_el(struct inode *dir, const char *name,
3456 int blocksize = dir->i_sb->s_blocksize; 3456 int blocksize = dir->i_sb->s_blocksize;
3457 3457
3458 status = ocfs2_read_dir_block(dir, 0, &bh, 0); 3458 status = ocfs2_read_dir_block(dir, 0, &bh, 0);
3459 if (status) { 3459 if (status)
3460 mlog_errno(status);
3461 goto bail; 3460 goto bail;
3462 }
3463 3461
3464 rec_len = OCFS2_DIR_REC_LEN(namelen); 3462 rec_len = OCFS2_DIR_REC_LEN(namelen);
3465 offset = 0; 3463 offset = 0;
@@ -3480,10 +3478,9 @@ static int ocfs2_find_dir_space_el(struct inode *dir, const char *name,
3480 status = ocfs2_read_dir_block(dir, 3478 status = ocfs2_read_dir_block(dir,
3481 offset >> sb->s_blocksize_bits, 3479 offset >> sb->s_blocksize_bits,
3482 &bh, 0); 3480 &bh, 0);
3483 if (status) { 3481 if (status)
3484 mlog_errno(status);
3485 goto bail; 3482 goto bail;
3486 } 3483
3487 /* move to next block */ 3484 /* move to next block */
3488 de = (struct ocfs2_dir_entry *) bh->b_data; 3485 de = (struct ocfs2_dir_entry *) bh->b_data;
3489 } 3486 }
@@ -3513,7 +3510,6 @@ next:
3513 de = (struct ocfs2_dir_entry *)((char *) de + le16_to_cpu(de->rec_len)); 3510 de = (struct ocfs2_dir_entry *)((char *) de + le16_to_cpu(de->rec_len));
3514 } 3511 }
3515 3512
3516 status = 0;
3517bail: 3513bail:
3518 brelse(bh); 3514 brelse(bh);
3519 if (status) 3515 if (status)
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c
index b46278f9ae44..fd6bbbbd7d78 100644
--- a/fs/ocfs2/dlm/dlmast.c
+++ b/fs/ocfs2/dlm/dlmast.c
@@ -385,8 +385,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data,
385 head = &res->granted; 385 head = &res->granted;
386 386
387 list_for_each_entry(lock, head, list) { 387 list_for_each_entry(lock, head, list) {
388 if (lock->ml.cookie == cookie) 388 /* if lock is found but unlock is pending ignore the bast */
389 if (lock->ml.cookie == cookie) {
390 if (lock->unlock_pending)
391 break;
389 goto do_ast; 392 goto do_ast;
393 }
390 } 394 }
391 395
392 mlog(0, "Got %sast for unknown lock! cookie=%u:%llu, name=%.*s, " 396 mlog(0, "Got %sast for unknown lock! cookie=%u:%llu, name=%.*s, "
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index 149eb556b8c6..825136070d2c 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -406,7 +406,7 @@ static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)
406 } 406 }
407 spin_unlock(&dlm->spinlock); 407 spin_unlock(&dlm->spinlock);
408 408
409 out += snprintf(buf + out, len - out, "Total on list: %ld\n", total); 409 out += snprintf(buf + out, len - out, "Total on list: %lu\n", total);
410 410
411 return out; 411 return out;
412} 412}
@@ -464,7 +464,7 @@ static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len)
464 spin_unlock(&dlm->master_lock); 464 spin_unlock(&dlm->master_lock);
465 465
466 out += snprintf(buf + out, len - out, 466 out += snprintf(buf + out, len - out,
467 "Total: %ld, Longest: %ld\n", total, longest); 467 "Total: %lu, Longest: %lu\n", total, longest);
468 return out; 468 return out;
469} 469}
470 470
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 50a59d2337b2..7df88a6dd626 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -674,20 +674,6 @@ static void dlm_leave_domain(struct dlm_ctxt *dlm)
674 spin_unlock(&dlm->spinlock); 674 spin_unlock(&dlm->spinlock);
675} 675}
676 676
677int dlm_joined(struct dlm_ctxt *dlm)
678{
679 int ret = 0;
680
681 spin_lock(&dlm_domain_lock);
682
683 if (dlm->dlm_state == DLM_CTXT_JOINED)
684 ret = 1;
685
686 spin_unlock(&dlm_domain_lock);
687
688 return ret;
689}
690
691int dlm_shutting_down(struct dlm_ctxt *dlm) 677int dlm_shutting_down(struct dlm_ctxt *dlm)
692{ 678{
693 int ret = 0; 679 int ret = 0;
diff --git a/fs/ocfs2/dlm/dlmdomain.h b/fs/ocfs2/dlm/dlmdomain.h
index 2f7f60bfeb3b..fd6122a38dbd 100644
--- a/fs/ocfs2/dlm/dlmdomain.h
+++ b/fs/ocfs2/dlm/dlmdomain.h
@@ -28,7 +28,6 @@
28extern spinlock_t dlm_domain_lock; 28extern spinlock_t dlm_domain_lock;
29extern struct list_head dlm_domains; 29extern struct list_head dlm_domains;
30 30
31int dlm_joined(struct dlm_ctxt *dlm);
32int dlm_shutting_down(struct dlm_ctxt *dlm); 31int dlm_shutting_down(struct dlm_ctxt *dlm);
33void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm, 32void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm,
34 int node_num); 33 int node_num);
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index cecd875653e4..ce12e0b1a31f 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1070,6 +1070,9 @@ static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm,
1070 dead_node, dlm->name); 1070 dead_node, dlm->name);
1071 list_del_init(&lock->list); 1071 list_del_init(&lock->list);
1072 dlm_lock_put(lock); 1072 dlm_lock_put(lock);
1073 /* Can't schedule DLM_UNLOCK_FREE_LOCK
1074 * - do manually */
1075 dlm_lock_put(lock);
1073 break; 1076 break;
1074 } 1077 }
1075 } 1078 }
@@ -2346,6 +2349,10 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
2346 dead_node, dlm->name); 2349 dead_node, dlm->name);
2347 list_del_init(&lock->list); 2350 list_del_init(&lock->list);
2348 dlm_lock_put(lock); 2351 dlm_lock_put(lock);
2352 /* Can't schedule
2353 * DLM_UNLOCK_FREE_LOCK
2354 * - do manually */
2355 dlm_lock_put(lock);
2349 break; 2356 break;
2350 } 2357 }
2351 } 2358 }
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 1c423af04c69..11849a44dc5a 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -3750,6 +3750,9 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
3750 break; 3750 break;
3751 spin_unlock(&dentry_attach_lock); 3751 spin_unlock(&dentry_attach_lock);
3752 3752
3753 if (S_ISDIR(dl->dl_inode->i_mode))
3754 shrink_dcache_parent(dentry);
3755
3753 mlog(0, "d_delete(%pd);\n", dentry); 3756 mlog(0, "d_delete(%pd);\n", dentry);
3754 3757
3755 /* 3758 /*
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 3950693dd0f6..245db4f504da 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
569 handle_t *handle = NULL; 569 handle_t *handle = NULL;
570 struct ocfs2_alloc_context *data_ac = NULL; 570 struct ocfs2_alloc_context *data_ac = NULL;
571 struct ocfs2_alloc_context *meta_ac = NULL; 571 struct ocfs2_alloc_context *meta_ac = NULL;
572 enum ocfs2_alloc_restarted why; 572 enum ocfs2_alloc_restarted why = RESTART_NONE;
573 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 573 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
574 struct ocfs2_extent_tree et; 574 struct ocfs2_extent_tree et;
575 int did_quota = 0; 575 int did_quota = 0;
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 4f502382180f..d10860fde165 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -1447,7 +1447,6 @@ bail:
1447 * requires that we call do_exit(). And it isn't exported, but 1447 * requires that we call do_exit(). And it isn't exported, but
1448 * complete_and_exit() seems to be a minimal wrapper around it. */ 1448 * complete_and_exit() seems to be a minimal wrapper around it. */
1449 complete_and_exit(NULL, status); 1449 complete_and_exit(NULL, status);
1450 return status;
1451} 1450}
1452 1451
1453void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num) 1452void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c
index 10d66c75cecb..9581d190f6e1 100644
--- a/fs/ocfs2/mmap.c
+++ b/fs/ocfs2/mmap.c
@@ -173,7 +173,6 @@ out:
173static const struct vm_operations_struct ocfs2_file_vm_ops = { 173static const struct vm_operations_struct ocfs2_file_vm_ops = {
174 .fault = ocfs2_fault, 174 .fault = ocfs2_fault,
175 .page_mkwrite = ocfs2_page_mkwrite, 175 .page_mkwrite = ocfs2_page_mkwrite,
176 .remap_pages = generic_file_remap_pages,
177}; 176};
178 177
179int ocfs2_mmap(struct file *file, struct vm_area_struct *vma) 178int ocfs2_mmap(struct file *file, struct vm_area_struct *vma)
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 7d6b7d090452..fdbcbfed529e 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -279,6 +279,8 @@ enum ocfs2_mount_options
279 writes */ 279 writes */
280 OCFS2_MOUNT_HB_NONE = 1 << 13, /* No heartbeat */ 280 OCFS2_MOUNT_HB_NONE = 1 << 13, /* No heartbeat */
281 OCFS2_MOUNT_HB_GLOBAL = 1 << 14, /* Global heartbeat */ 281 OCFS2_MOUNT_HB_GLOBAL = 1 << 14, /* Global heartbeat */
282
283 OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT = 1 << 15, /* Journal Async Commit */
282}; 284};
283 285
284#define OCFS2_OSB_SOFT_RO 0x0001 286#define OCFS2_OSB_SOFT_RO 0x0001
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 89c0b2620814..3d0b63d34225 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -73,12 +73,6 @@ static loff_t ol_dqblk_off(struct super_block *sb, int c, int off)
73 ol_dqblk_block_off(sb, c, off); 73 ol_dqblk_block_off(sb, c, off);
74} 74}
75 75
76/* Compute block number from given offset */
77static inline unsigned int ol_dqblk_file_block(struct super_block *sb, loff_t off)
78{
79 return off >> sb->s_blocksize_bits;
80}
81
82static inline unsigned int ol_dqblk_block_offset(struct super_block *sb, loff_t off) 76static inline unsigned int ol_dqblk_block_offset(struct super_block *sb, loff_t off)
83{ 77{
84 return off & ((1 << sb->s_blocksize_bits) - 1); 78 return off & ((1 << sb->s_blocksize_bits) - 1);
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index d81f6e2a97f5..ee541f92dab4 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -2428,8 +2428,6 @@ static int ocfs2_calc_refcount_meta_credits(struct super_block *sb,
2428 get_bh(prev_bh); 2428 get_bh(prev_bh);
2429 } 2429 }
2430 2430
2431 rb = (struct ocfs2_refcount_block *)ref_leaf_bh->b_data;
2432
2433 trace_ocfs2_calc_refcount_meta_credits_iterate( 2431 trace_ocfs2_calc_refcount_meta_credits_iterate(
2434 recs_add, (unsigned long long)cpos, clusters, 2432 recs_add, (unsigned long long)cpos, clusters,
2435 (unsigned long long)le64_to_cpu(rec.r_cpos), 2433 (unsigned long long)le64_to_cpu(rec.r_cpos),
diff --git a/fs/ocfs2/reservations.c b/fs/ocfs2/reservations.c
index 41ffd36c689c..6a348b0294ab 100644
--- a/fs/ocfs2/reservations.c
+++ b/fs/ocfs2/reservations.c
@@ -39,7 +39,7 @@
39#define OCFS2_CHECK_RESERVATIONS 39#define OCFS2_CHECK_RESERVATIONS
40#endif 40#endif
41 41
42DEFINE_SPINLOCK(resv_lock); 42static DEFINE_SPINLOCK(resv_lock);
43 43
44#define OCFS2_MIN_RESV_WINDOW_BITS 8 44#define OCFS2_MIN_RESV_WINDOW_BITS 8
45#define OCFS2_MAX_RESV_WINDOW_BITS 1024 45#define OCFS2_MAX_RESV_WINDOW_BITS 1024
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 706c71c2955d..87a1f7679d9b 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -191,6 +191,7 @@ enum {
191 Opt_coherency_full, 191 Opt_coherency_full,
192 Opt_resv_level, 192 Opt_resv_level,
193 Opt_dir_resv_level, 193 Opt_dir_resv_level,
194 Opt_journal_async_commit,
194 Opt_err, 195 Opt_err,
195}; 196};
196 197
@@ -222,6 +223,7 @@ static const match_table_t tokens = {
222 {Opt_coherency_full, "coherency=full"}, 223 {Opt_coherency_full, "coherency=full"},
223 {Opt_resv_level, "resv_level=%u"}, 224 {Opt_resv_level, "resv_level=%u"},
224 {Opt_dir_resv_level, "dir_resv_level=%u"}, 225 {Opt_dir_resv_level, "dir_resv_level=%u"},
226 {Opt_journal_async_commit, "journal_async_commit"},
225 {Opt_err, NULL} 227 {Opt_err, NULL}
226}; 228};
227 229
@@ -1470,6 +1472,9 @@ static int ocfs2_parse_options(struct super_block *sb,
1470 option < OCFS2_MAX_RESV_LEVEL) 1472 option < OCFS2_MAX_RESV_LEVEL)
1471 mopt->dir_resv_level = option; 1473 mopt->dir_resv_level = option;
1472 break; 1474 break;
1475 case Opt_journal_async_commit:
1476 mopt->mount_opt |= OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT;
1477 break;
1473 default: 1478 default:
1474 mlog(ML_ERROR, 1479 mlog(ML_ERROR,
1475 "Unrecognized mount option \"%s\" " 1480 "Unrecognized mount option \"%s\" "
@@ -1576,6 +1581,9 @@ static int ocfs2_show_options(struct seq_file *s, struct dentry *root)
1576 if (osb->osb_dir_resv_level != osb->osb_resv_level) 1581 if (osb->osb_dir_resv_level != osb->osb_resv_level)
1577 seq_printf(s, ",dir_resv_level=%d", osb->osb_resv_level); 1582 seq_printf(s, ",dir_resv_level=%d", osb->osb_resv_level);
1578 1583
1584 if (opts & OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT)
1585 seq_printf(s, ",journal_async_commit");
1586
1579 return 0; 1587 return 0;
1580} 1588}
1581 1589
@@ -2445,6 +2453,15 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)
2445 goto finally; 2453 goto finally;
2446 } 2454 }
2447 2455
2456 if (osb->s_mount_opt & OCFS2_MOUNT_JOURNAL_ASYNC_COMMIT)
2457 jbd2_journal_set_features(osb->journal->j_journal,
2458 JBD2_FEATURE_COMPAT_CHECKSUM, 0,
2459 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
2460 else
2461 jbd2_journal_clear_features(osb->journal->j_journal,
2462 JBD2_FEATURE_COMPAT_CHECKSUM, 0,
2463 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT);
2464
2448 if (dirty) { 2465 if (dirty) {
2449 /* recover my local alloc if we didn't unmount cleanly. */ 2466 /* recover my local alloc if we didn't unmount cleanly. */
2450 status = ocfs2_begin_local_alloc_recovery(osb, 2467 status = ocfs2_begin_local_alloc_recovery(osb,
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 662f8dee149f..85b190dc132f 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -5334,16 +5334,6 @@ out:
5334 return ret; 5334 return ret;
5335} 5335}
5336 5336
5337static inline char *ocfs2_xattr_bucket_get_val(struct inode *inode,
5338 struct ocfs2_xattr_bucket *bucket,
5339 int offs)
5340{
5341 int block_off = offs >> inode->i_sb->s_blocksize_bits;
5342
5343 offs = offs % inode->i_sb->s_blocksize;
5344 return bucket_block(bucket, block_off) + offs;
5345}
5346
5347/* 5337/*
5348 * Truncate the specified xe_off entry in xattr bucket. 5338 * Truncate the specified xe_off entry in xattr bucket.
5349 * bucket is indicated by header_bh and len is the new length. 5339 * bucket is indicated by header_bh and len is the new length.