diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/aops.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/buffer_head_io.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp_internal.h | 4 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmapi.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmast.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 38 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 38 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmunlock.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/dlmglue.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/export.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/file.c | 14 | ||||
-rw-r--r-- | fs/ocfs2/inode.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/journal.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/uptodate.c | 4 |
20 files changed, 72 insertions, 72 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 3dae4a13f6e4..7e9df11260f4 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -599,7 +599,7 @@ bail: | |||
599 | return ret; | 599 | return ret; |
600 | } | 600 | } |
601 | 601 | ||
602 | /* | 602 | /* |
603 | * ocfs2_dio_end_io is called by the dio core when a dio is finished. We're | 603 | * ocfs2_dio_end_io is called by the dio core when a dio is finished. We're |
604 | * particularly interested in the aio/dio case. Like the core uses | 604 | * particularly interested in the aio/dio case. Like the core uses |
605 | * i_alloc_sem, we use the rw_lock DLM lock to protect io on one node from | 605 | * i_alloc_sem, we use the rw_lock DLM lock to protect io on one node from |
@@ -670,7 +670,7 @@ static ssize_t ocfs2_direct_IO(int rw, | |||
670 | 670 | ||
671 | ret = blockdev_direct_IO_no_locking(rw, iocb, inode, | 671 | ret = blockdev_direct_IO_no_locking(rw, iocb, inode, |
672 | inode->i_sb->s_bdev, iov, offset, | 672 | inode->i_sb->s_bdev, iov, offset, |
673 | nr_segs, | 673 | nr_segs, |
674 | ocfs2_direct_IO_get_blocks, | 674 | ocfs2_direct_IO_get_blocks, |
675 | ocfs2_dio_end_io); | 675 | ocfs2_dio_end_io); |
676 | 676 | ||
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index d43d34a1dd31..21c808f752d8 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -368,7 +368,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, | |||
368 | } | 368 | } |
369 | ocfs2_metadata_cache_io_unlock(ci); | 369 | ocfs2_metadata_cache_io_unlock(ci); |
370 | 370 | ||
371 | mlog(ML_BH_IO, "block=(%llu), nr=(%d), cached=%s, flags=0x%x\n", | 371 | mlog(ML_BH_IO, "block=(%llu), nr=(%d), cached=%s, flags=0x%x\n", |
372 | (unsigned long long)block, nr, | 372 | (unsigned long long)block, nr, |
373 | ((flags & OCFS2_BH_IGNORE_CACHE) || ignore_cache) ? "no" : "yes", | 373 | ((flags & OCFS2_BH_IGNORE_CACHE) || ignore_cache) ? "no" : "yes", |
374 | flags); | 374 | flags); |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index eda5b8bcddd5..5c9890006708 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -78,7 +78,7 @@ static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type); | |||
78 | 78 | ||
79 | unsigned int o2hb_dead_threshold = O2HB_DEFAULT_DEAD_THRESHOLD; | 79 | unsigned int o2hb_dead_threshold = O2HB_DEFAULT_DEAD_THRESHOLD; |
80 | 80 | ||
81 | /* Only sets a new threshold if there are no active regions. | 81 | /* Only sets a new threshold if there are no active regions. |
82 | * | 82 | * |
83 | * No locking or otherwise interesting code is required for reading | 83 | * No locking or otherwise interesting code is required for reading |
84 | * o2hb_dead_threshold as it can't change once regions are active and | 84 | * o2hb_dead_threshold as it can't change once regions are active and |
@@ -170,7 +170,7 @@ static void o2hb_write_timeout(struct work_struct *work) | |||
170 | 170 | ||
171 | mlog(ML_ERROR, "Heartbeat write timeout to device %s after %u " | 171 | mlog(ML_ERROR, "Heartbeat write timeout to device %s after %u " |
172 | "milliseconds\n", reg->hr_dev_name, | 172 | "milliseconds\n", reg->hr_dev_name, |
173 | jiffies_to_msecs(jiffies - reg->hr_last_timeout_start)); | 173 | jiffies_to_msecs(jiffies - reg->hr_last_timeout_start)); |
174 | o2quo_disk_timeout(); | 174 | o2quo_disk_timeout(); |
175 | } | 175 | } |
176 | 176 | ||
@@ -624,7 +624,7 @@ static int o2hb_check_slot(struct o2hb_region *reg, | |||
624 | "seq %llu last %llu changed %u equal %u\n", | 624 | "seq %llu last %llu changed %u equal %u\n", |
625 | slot->ds_node_num, (long long)slot->ds_last_generation, | 625 | slot->ds_node_num, (long long)slot->ds_last_generation, |
626 | le32_to_cpu(hb_block->hb_cksum), | 626 | le32_to_cpu(hb_block->hb_cksum), |
627 | (unsigned long long)le64_to_cpu(hb_block->hb_seq), | 627 | (unsigned long long)le64_to_cpu(hb_block->hb_seq), |
628 | (unsigned long long)slot->ds_last_time, slot->ds_changed_samples, | 628 | (unsigned long long)slot->ds_last_time, slot->ds_changed_samples, |
629 | slot->ds_equal_samples); | 629 | slot->ds_equal_samples); |
630 | 630 | ||
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 334f231a422c..938ba181a3d9 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -930,7 +930,7 @@ static void o2net_sendpage(struct o2net_sock_container *sc, | |||
930 | cond_resched(); | 930 | cond_resched(); |
931 | continue; | 931 | continue; |
932 | } | 932 | } |
933 | mlog(ML_ERROR, "sendpage of size %zu to " SC_NODEF_FMT | 933 | mlog(ML_ERROR, "sendpage of size %zu to " SC_NODEF_FMT |
934 | " failed with %zd\n", size, SC_NODEF_ARGS(sc), ret); | 934 | " failed with %zd\n", size, SC_NODEF_ARGS(sc), ret); |
935 | o2net_ensure_shutdown(nn, sc, 0); | 935 | o2net_ensure_shutdown(nn, sc, 0); |
936 | break; | 936 | break; |
@@ -1483,7 +1483,7 @@ static void o2net_idle_timer(unsigned long data) | |||
1483 | mlog(ML_NOTICE, "here are some times that might help debug the " | 1483 | mlog(ML_NOTICE, "here are some times that might help debug the " |
1484 | "situation: (tmr %ld.%ld now %ld.%ld dr %ld.%ld adv " | 1484 | "situation: (tmr %ld.%ld now %ld.%ld dr %ld.%ld adv " |
1485 | "%ld.%ld:%ld.%ld func (%08x:%u) %ld.%ld:%ld.%ld)\n", | 1485 | "%ld.%ld:%ld.%ld func (%08x:%u) %ld.%ld:%ld.%ld)\n", |
1486 | sc->sc_tv_timer.tv_sec, (long) sc->sc_tv_timer.tv_usec, | 1486 | sc->sc_tv_timer.tv_sec, (long) sc->sc_tv_timer.tv_usec, |
1487 | now.tv_sec, (long) now.tv_usec, | 1487 | now.tv_sec, (long) now.tv_usec, |
1488 | sc->sc_tv_data_ready.tv_sec, (long) sc->sc_tv_data_ready.tv_usec, | 1488 | sc->sc_tv_data_ready.tv_sec, (long) sc->sc_tv_data_ready.tv_usec, |
1489 | sc->sc_tv_advance_start.tv_sec, | 1489 | sc->sc_tv_advance_start.tv_sec, |
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h index 8d58cfe410b1..96fa7ebc530c 100644 --- a/fs/ocfs2/cluster/tcp_internal.h +++ b/fs/ocfs2/cluster/tcp_internal.h | |||
@@ -32,10 +32,10 @@ | |||
32 | * on their number */ | 32 | * on their number */ |
33 | #define O2NET_QUORUM_DELAY_MS ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS) | 33 | #define O2NET_QUORUM_DELAY_MS ((o2hb_dead_threshold + 2) * O2HB_REGION_TIMEOUT_MS) |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * This version number represents quite a lot, unfortunately. It not | 36 | * This version number represents quite a lot, unfortunately. It not |
37 | * only represents the raw network message protocol on the wire but also | 37 | * only represents the raw network message protocol on the wire but also |
38 | * locking semantics of the file system using the protocol. It should | 38 | * locking semantics of the file system using the protocol. It should |
39 | * be somewhere else, I'm sure, but right now it isn't. | 39 | * be somewhere else, I'm sure, but right now it isn't. |
40 | * | 40 | * |
41 | * With version 11, we separate out the filesystem locking portion. The | 41 | * With version 11, we separate out the filesystem locking portion. The |
diff --git a/fs/ocfs2/dlm/dlmapi.h b/fs/ocfs2/dlm/dlmapi.h index b5786a787fab..3cfa114aa391 100644 --- a/fs/ocfs2/dlm/dlmapi.h +++ b/fs/ocfs2/dlm/dlmapi.h | |||
@@ -95,7 +95,7 @@ const char *dlm_errname(enum dlm_status err); | |||
95 | mlog(ML_ERROR, "dlm status = %s\n", dlm_errname((st))); \ | 95 | mlog(ML_ERROR, "dlm status = %s\n", dlm_errname((st))); \ |
96 | } while (0) | 96 | } while (0) |
97 | 97 | ||
98 | #define DLM_LKSB_UNUSED1 0x01 | 98 | #define DLM_LKSB_UNUSED1 0x01 |
99 | #define DLM_LKSB_PUT_LVB 0x02 | 99 | #define DLM_LKSB_PUT_LVB 0x02 |
100 | #define DLM_LKSB_GET_LVB 0x04 | 100 | #define DLM_LKSB_GET_LVB 0x04 |
101 | #define DLM_LKSB_UNUSED2 0x08 | 101 | #define DLM_LKSB_UNUSED2 0x08 |
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 01cf8cc3d286..dccc439fa087 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
@@ -123,7 +123,7 @@ static void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock) | |||
123 | dlm_lock_put(lock); | 123 | dlm_lock_put(lock); |
124 | /* free up the reserved bast that we are cancelling. | 124 | /* free up the reserved bast that we are cancelling. |
125 | * guaranteed that this will not be the last reserved | 125 | * guaranteed that this will not be the last reserved |
126 | * ast because *both* an ast and a bast were reserved | 126 | * ast because *both* an ast and a bast were reserved |
127 | * to get to this point. the res->spinlock will not be | 127 | * to get to this point. the res->spinlock will not be |
128 | * taken here */ | 128 | * taken here */ |
129 | dlm_lockres_release_ast(dlm, res); | 129 | dlm_lockres_release_ast(dlm, res); |
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index ca96bce50e18..f283bce776b4 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -396,7 +396,7 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm, | |||
396 | /* instead of logging the same network error over | 396 | /* instead of logging the same network error over |
397 | * and over, sleep here and wait for the heartbeat | 397 | * and over, sleep here and wait for the heartbeat |
398 | * to notice the node is dead. times out after 5s. */ | 398 | * to notice the node is dead. times out after 5s. */ |
399 | dlm_wait_for_node_death(dlm, res->owner, | 399 | dlm_wait_for_node_death(dlm, res->owner, |
400 | DLM_NODE_DEATH_WAIT_MAX); | 400 | DLM_NODE_DEATH_WAIT_MAX); |
401 | ret = DLM_RECOVERING; | 401 | ret = DLM_RECOVERING; |
402 | mlog(0, "node %u died so returning DLM_RECOVERING " | 402 | mlog(0, "node %u died so returning DLM_RECOVERING " |
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 0334000676d3..988c9055fd4e 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -816,7 +816,7 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | |||
816 | } | 816 | } |
817 | 817 | ||
818 | /* Once the dlm ctxt is marked as leaving then we don't want | 818 | /* Once the dlm ctxt is marked as leaving then we don't want |
819 | * to be put in someone's domain map. | 819 | * to be put in someone's domain map. |
820 | * Also, explicitly disallow joining at certain troublesome | 820 | * Also, explicitly disallow joining at certain troublesome |
821 | * times (ie. during recovery). */ | 821 | * times (ie. during recovery). */ |
822 | if (dlm && dlm->dlm_state != DLM_CTXT_LEAVING) { | 822 | if (dlm && dlm->dlm_state != DLM_CTXT_LEAVING) { |
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index 437698e9465f..733337772671 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -269,7 +269,7 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, | |||
269 | } | 269 | } |
270 | dlm_revert_pending_lock(res, lock); | 270 | dlm_revert_pending_lock(res, lock); |
271 | dlm_lock_put(lock); | 271 | dlm_lock_put(lock); |
272 | } else if (dlm_is_recovery_lock(res->lockname.name, | 272 | } else if (dlm_is_recovery_lock(res->lockname.name, |
273 | res->lockname.len)) { | 273 | res->lockname.len)) { |
274 | /* special case for the $RECOVERY lock. | 274 | /* special case for the $RECOVERY lock. |
275 | * there will never be an AST delivered to put | 275 | * there will never be an AST delivered to put |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 03ccf9a7b1f4..a659606dcb95 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -366,7 +366,7 @@ void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up) | |||
366 | struct dlm_master_list_entry *mle; | 366 | struct dlm_master_list_entry *mle; |
367 | 367 | ||
368 | assert_spin_locked(&dlm->spinlock); | 368 | assert_spin_locked(&dlm->spinlock); |
369 | 369 | ||
370 | list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) { | 370 | list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) { |
371 | if (node_up) | 371 | if (node_up) |
372 | dlm_mle_node_up(dlm, mle, NULL, idx); | 372 | dlm_mle_node_up(dlm, mle, NULL, idx); |
@@ -833,7 +833,7 @@ lookup: | |||
833 | __dlm_insert_mle(dlm, mle); | 833 | __dlm_insert_mle(dlm, mle); |
834 | 834 | ||
835 | /* still holding the dlm spinlock, check the recovery map | 835 | /* still holding the dlm spinlock, check the recovery map |
836 | * to see if there are any nodes that still need to be | 836 | * to see if there are any nodes that still need to be |
837 | * considered. these will not appear in the mle nodemap | 837 | * considered. these will not appear in the mle nodemap |
838 | * but they might own this lockres. wait on them. */ | 838 | * but they might own this lockres. wait on them. */ |
839 | bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); | 839 | bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); |
@@ -883,7 +883,7 @@ redo_request: | |||
883 | msleep(500); | 883 | msleep(500); |
884 | } | 884 | } |
885 | continue; | 885 | continue; |
886 | } | 886 | } |
887 | 887 | ||
888 | dlm_kick_recovery_thread(dlm); | 888 | dlm_kick_recovery_thread(dlm); |
889 | msleep(1000); | 889 | msleep(1000); |
@@ -939,8 +939,8 @@ wait: | |||
939 | res->lockname.name, blocked); | 939 | res->lockname.name, blocked); |
940 | if (++tries > 20) { | 940 | if (++tries > 20) { |
941 | mlog(ML_ERROR, "%s:%.*s: spinning on " | 941 | mlog(ML_ERROR, "%s:%.*s: spinning on " |
942 | "dlm_wait_for_lock_mastery, blocked=%d\n", | 942 | "dlm_wait_for_lock_mastery, blocked=%d\n", |
943 | dlm->name, res->lockname.len, | 943 | dlm->name, res->lockname.len, |
944 | res->lockname.name, blocked); | 944 | res->lockname.name, blocked); |
945 | dlm_print_one_lock_resource(res); | 945 | dlm_print_one_lock_resource(res); |
946 | dlm_print_one_mle(mle); | 946 | dlm_print_one_mle(mle); |
@@ -1029,7 +1029,7 @@ recheck: | |||
1029 | ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked); | 1029 | ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked); |
1030 | b = (mle->type == DLM_MLE_BLOCK); | 1030 | b = (mle->type == DLM_MLE_BLOCK); |
1031 | if ((*blocked && !b) || (!*blocked && b)) { | 1031 | if ((*blocked && !b) || (!*blocked && b)) { |
1032 | mlog(0, "%s:%.*s: status change: old=%d new=%d\n", | 1032 | mlog(0, "%s:%.*s: status change: old=%d new=%d\n", |
1033 | dlm->name, res->lockname.len, res->lockname.name, | 1033 | dlm->name, res->lockname.len, res->lockname.name, |
1034 | *blocked, b); | 1034 | *blocked, b); |
1035 | *blocked = b; | 1035 | *blocked = b; |
@@ -1602,7 +1602,7 @@ send_response: | |||
1602 | } | 1602 | } |
1603 | mlog(0, "%u is the owner of %.*s, cleaning everyone else\n", | 1603 | mlog(0, "%u is the owner of %.*s, cleaning everyone else\n", |
1604 | dlm->node_num, res->lockname.len, res->lockname.name); | 1604 | dlm->node_num, res->lockname.len, res->lockname.name); |
1605 | ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx, | 1605 | ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx, |
1606 | DLM_ASSERT_MASTER_MLE_CLEANUP); | 1606 | DLM_ASSERT_MASTER_MLE_CLEANUP); |
1607 | if (ret < 0) { | 1607 | if (ret < 0) { |
1608 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); | 1608 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); |
@@ -1701,7 +1701,7 @@ again: | |||
1701 | 1701 | ||
1702 | if (r & DLM_ASSERT_RESPONSE_REASSERT) { | 1702 | if (r & DLM_ASSERT_RESPONSE_REASSERT) { |
1703 | mlog(0, "%.*s: node %u create mles on other " | 1703 | mlog(0, "%.*s: node %u create mles on other " |
1704 | "nodes and requests a re-assert\n", | 1704 | "nodes and requests a re-assert\n", |
1705 | namelen, lockname, to); | 1705 | namelen, lockname, to); |
1706 | reassert = 1; | 1706 | reassert = 1; |
1707 | } | 1707 | } |
@@ -1812,7 +1812,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1812 | spin_unlock(&dlm->master_lock); | 1812 | spin_unlock(&dlm->master_lock); |
1813 | spin_unlock(&dlm->spinlock); | 1813 | spin_unlock(&dlm->spinlock); |
1814 | goto done; | 1814 | goto done; |
1815 | } | 1815 | } |
1816 | } | 1816 | } |
1817 | } | 1817 | } |
1818 | spin_unlock(&dlm->master_lock); | 1818 | spin_unlock(&dlm->master_lock); |
@@ -1883,7 +1883,7 @@ ok: | |||
1883 | int extra_ref = 0; | 1883 | int extra_ref = 0; |
1884 | int nn = -1; | 1884 | int nn = -1; |
1885 | int rr, err = 0; | 1885 | int rr, err = 0; |
1886 | 1886 | ||
1887 | spin_lock(&mle->spinlock); | 1887 | spin_lock(&mle->spinlock); |
1888 | if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION) | 1888 | if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION) |
1889 | extra_ref = 1; | 1889 | extra_ref = 1; |
@@ -1891,7 +1891,7 @@ ok: | |||
1891 | /* MASTER mle: if any bits set in the response map | 1891 | /* MASTER mle: if any bits set in the response map |
1892 | * then the calling node needs to re-assert to clear | 1892 | * then the calling node needs to re-assert to clear |
1893 | * up nodes that this node contacted */ | 1893 | * up nodes that this node contacted */ |
1894 | while ((nn = find_next_bit (mle->response_map, O2NM_MAX_NODES, | 1894 | while ((nn = find_next_bit (mle->response_map, O2NM_MAX_NODES, |
1895 | nn+1)) < O2NM_MAX_NODES) { | 1895 | nn+1)) < O2NM_MAX_NODES) { |
1896 | if (nn != dlm->node_num && nn != assert->node_idx) | 1896 | if (nn != dlm->node_num && nn != assert->node_idx) |
1897 | master_request = 1; | 1897 | master_request = 1; |
@@ -2002,7 +2002,7 @@ kill: | |||
2002 | __dlm_print_one_lock_resource(res); | 2002 | __dlm_print_one_lock_resource(res); |
2003 | spin_unlock(&res->spinlock); | 2003 | spin_unlock(&res->spinlock); |
2004 | spin_unlock(&dlm->spinlock); | 2004 | spin_unlock(&dlm->spinlock); |
2005 | *ret_data = (void *)res; | 2005 | *ret_data = (void *)res; |
2006 | dlm_put(dlm); | 2006 | dlm_put(dlm); |
2007 | return -EINVAL; | 2007 | return -EINVAL; |
2008 | } | 2008 | } |
@@ -2040,10 +2040,10 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, | |||
2040 | item->u.am.request_from = request_from; | 2040 | item->u.am.request_from = request_from; |
2041 | item->u.am.flags = flags; | 2041 | item->u.am.flags = flags; |
2042 | 2042 | ||
2043 | if (ignore_higher) | 2043 | if (ignore_higher) |
2044 | mlog(0, "IGNORE HIGHER: %.*s\n", res->lockname.len, | 2044 | mlog(0, "IGNORE HIGHER: %.*s\n", res->lockname.len, |
2045 | res->lockname.name); | 2045 | res->lockname.name); |
2046 | 2046 | ||
2047 | spin_lock(&dlm->work_lock); | 2047 | spin_lock(&dlm->work_lock); |
2048 | list_add_tail(&item->list, &dlm->work_list); | 2048 | list_add_tail(&item->list, &dlm->work_list); |
2049 | spin_unlock(&dlm->work_lock); | 2049 | spin_unlock(&dlm->work_lock); |
@@ -2133,7 +2133,7 @@ put: | |||
2133 | * think that $RECOVERY is currently mastered by a dead node. If so, | 2133 | * think that $RECOVERY is currently mastered by a dead node. If so, |
2134 | * we wait a short time to allow that node to get notified by its own | 2134 | * we wait a short time to allow that node to get notified by its own |
2135 | * heartbeat stack, then check again. All $RECOVERY lock resources | 2135 | * heartbeat stack, then check again. All $RECOVERY lock resources |
2136 | * mastered by dead nodes are purged when the hearbeat callback is | 2136 | * mastered by dead nodes are purged when the hearbeat callback is |
2137 | * fired, so we can know for sure that it is safe to continue once | 2137 | * fired, so we can know for sure that it is safe to continue once |
2138 | * the node returns a live node or no node. */ | 2138 | * the node returns a live node or no node. */ |
2139 | static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, | 2139 | static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, |
@@ -2174,7 +2174,7 @@ static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, | |||
2174 | ret = -EAGAIN; | 2174 | ret = -EAGAIN; |
2175 | } | 2175 | } |
2176 | spin_unlock(&dlm->spinlock); | 2176 | spin_unlock(&dlm->spinlock); |
2177 | mlog(0, "%s: reco lock master is %u\n", dlm->name, | 2177 | mlog(0, "%s: reco lock master is %u\n", dlm->name, |
2178 | master); | 2178 | master); |
2179 | break; | 2179 | break; |
2180 | } | 2180 | } |
@@ -2602,7 +2602,7 @@ fail: | |||
2602 | 2602 | ||
2603 | mlog(0, "%s:%.*s: timed out during migration\n", | 2603 | mlog(0, "%s:%.*s: timed out during migration\n", |
2604 | dlm->name, res->lockname.len, res->lockname.name); | 2604 | dlm->name, res->lockname.len, res->lockname.name); |
2605 | /* avoid hang during shutdown when migrating lockres | 2605 | /* avoid hang during shutdown when migrating lockres |
2606 | * to a node which also goes down */ | 2606 | * to a node which also goes down */ |
2607 | if (dlm_is_node_dead(dlm, target)) { | 2607 | if (dlm_is_node_dead(dlm, target)) { |
2608 | mlog(0, "%s:%.*s: expected migration " | 2608 | mlog(0, "%s:%.*s: expected migration " |
@@ -2738,7 +2738,7 @@ static int dlm_migration_can_proceed(struct dlm_ctxt *dlm, | |||
2738 | can_proceed = !!(res->state & DLM_LOCK_RES_MIGRATING); | 2738 | can_proceed = !!(res->state & DLM_LOCK_RES_MIGRATING); |
2739 | spin_unlock(&res->spinlock); | 2739 | spin_unlock(&res->spinlock); |
2740 | 2740 | ||
2741 | /* target has died, so make the caller break out of the | 2741 | /* target has died, so make the caller break out of the |
2742 | * wait_event, but caller must recheck the domain_map */ | 2742 | * wait_event, but caller must recheck the domain_map */ |
2743 | spin_lock(&dlm->spinlock); | 2743 | spin_lock(&dlm->spinlock); |
2744 | if (!test_bit(mig_target, dlm->domain_map)) | 2744 | if (!test_bit(mig_target, dlm->domain_map)) |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 2f9e4e19a4f2..57736d3ea7b5 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -1050,7 +1050,7 @@ static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm, | |||
1050 | if (lock->ml.node == dead_node) { | 1050 | if (lock->ml.node == dead_node) { |
1051 | mlog(0, "AHA! there was " | 1051 | mlog(0, "AHA! there was " |
1052 | "a $RECOVERY lock for dead " | 1052 | "a $RECOVERY lock for dead " |
1053 | "node %u (%s)!\n", | 1053 | "node %u (%s)!\n", |
1054 | dead_node, dlm->name); | 1054 | dead_node, dlm->name); |
1055 | list_del_init(&lock->list); | 1055 | list_del_init(&lock->list); |
1056 | dlm_lock_put(lock); | 1056 | dlm_lock_put(lock); |
@@ -1839,7 +1839,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, | |||
1839 | * the lvb. */ | 1839 | * the lvb. */ |
1840 | memcpy(res->lvb, mres->lvb, DLM_LVB_LEN); | 1840 | memcpy(res->lvb, mres->lvb, DLM_LVB_LEN); |
1841 | } else { | 1841 | } else { |
1842 | /* otherwise, the node is sending its | 1842 | /* otherwise, the node is sending its |
1843 | * most recent valid lvb info */ | 1843 | * most recent valid lvb info */ |
1844 | BUG_ON(ml->type != LKM_EXMODE && | 1844 | BUG_ON(ml->type != LKM_EXMODE && |
1845 | ml->type != LKM_PRMODE); | 1845 | ml->type != LKM_PRMODE); |
@@ -2114,7 +2114,7 @@ static void dlm_revalidate_lvb(struct dlm_ctxt *dlm, | |||
2114 | assert_spin_locked(&res->spinlock); | 2114 | assert_spin_locked(&res->spinlock); |
2115 | 2115 | ||
2116 | if (res->owner == dlm->node_num) | 2116 | if (res->owner == dlm->node_num) |
2117 | /* if this node owned the lockres, and if the dead node | 2117 | /* if this node owned the lockres, and if the dead node |
2118 | * had an EX when he died, blank out the lvb */ | 2118 | * had an EX when he died, blank out the lvb */ |
2119 | search_node = dead_node; | 2119 | search_node = dead_node; |
2120 | else { | 2120 | else { |
@@ -2152,7 +2152,7 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm, | |||
2152 | 2152 | ||
2153 | /* this node is the lockres master: | 2153 | /* this node is the lockres master: |
2154 | * 1) remove any stale locks for the dead node | 2154 | * 1) remove any stale locks for the dead node |
2155 | * 2) if the dead node had an EX when he died, blank out the lvb | 2155 | * 2) if the dead node had an EX when he died, blank out the lvb |
2156 | */ | 2156 | */ |
2157 | assert_spin_locked(&dlm->spinlock); | 2157 | assert_spin_locked(&dlm->spinlock); |
2158 | assert_spin_locked(&res->spinlock); | 2158 | assert_spin_locked(&res->spinlock); |
@@ -2260,7 +2260,7 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node) | |||
2260 | } | 2260 | } |
2261 | spin_unlock(&res->spinlock); | 2261 | spin_unlock(&res->spinlock); |
2262 | continue; | 2262 | continue; |
2263 | } | 2263 | } |
2264 | spin_lock(&res->spinlock); | 2264 | spin_lock(&res->spinlock); |
2265 | /* zero the lvb if necessary */ | 2265 | /* zero the lvb if necessary */ |
2266 | dlm_revalidate_lvb(dlm, res, dead_node); | 2266 | dlm_revalidate_lvb(dlm, res, dead_node); |
@@ -2411,7 +2411,7 @@ static void dlm_reco_unlock_ast(void *astdata, enum dlm_status st) | |||
2411 | * this function on each node racing to become the recovery | 2411 | * this function on each node racing to become the recovery |
2412 | * master will not stop attempting this until either: | 2412 | * master will not stop attempting this until either: |
2413 | * a) this node gets the EX (and becomes the recovery master), | 2413 | * a) this node gets the EX (and becomes the recovery master), |
2414 | * or b) dlm->reco.new_master gets set to some nodenum | 2414 | * or b) dlm->reco.new_master gets set to some nodenum |
2415 | * != O2NM_INVALID_NODE_NUM (another node will do the reco). | 2415 | * != O2NM_INVALID_NODE_NUM (another node will do the reco). |
2416 | * so each time a recovery master is needed, the entire cluster | 2416 | * so each time a recovery master is needed, the entire cluster |
2417 | * will sync at this point. if the new master dies, that will | 2417 | * will sync at this point. if the new master dies, that will |
@@ -2424,7 +2424,7 @@ static int dlm_pick_recovery_master(struct dlm_ctxt *dlm) | |||
2424 | 2424 | ||
2425 | mlog(0, "starting recovery of %s at %lu, dead=%u, this=%u\n", | 2425 | mlog(0, "starting recovery of %s at %lu, dead=%u, this=%u\n", |
2426 | dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); | 2426 | dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); |
2427 | again: | 2427 | again: |
2428 | memset(&lksb, 0, sizeof(lksb)); | 2428 | memset(&lksb, 0, sizeof(lksb)); |
2429 | 2429 | ||
2430 | ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY, | 2430 | ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY, |
@@ -2437,8 +2437,8 @@ again: | |||
2437 | if (ret == DLM_NORMAL) { | 2437 | if (ret == DLM_NORMAL) { |
2438 | mlog(0, "dlm=%s dlmlock says I got it (this=%u)\n", | 2438 | mlog(0, "dlm=%s dlmlock says I got it (this=%u)\n", |
2439 | dlm->name, dlm->node_num); | 2439 | dlm->name, dlm->node_num); |
2440 | 2440 | ||
2441 | /* got the EX lock. check to see if another node | 2441 | /* got the EX lock. check to see if another node |
2442 | * just became the reco master */ | 2442 | * just became the reco master */ |
2443 | if (dlm_reco_master_ready(dlm)) { | 2443 | if (dlm_reco_master_ready(dlm)) { |
2444 | mlog(0, "%s: got reco EX lock, but %u will " | 2444 | mlog(0, "%s: got reco EX lock, but %u will " |
@@ -2451,12 +2451,12 @@ again: | |||
2451 | /* see if recovery was already finished elsewhere */ | 2451 | /* see if recovery was already finished elsewhere */ |
2452 | spin_lock(&dlm->spinlock); | 2452 | spin_lock(&dlm->spinlock); |
2453 | if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { | 2453 | if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { |
2454 | status = -EINVAL; | 2454 | status = -EINVAL; |
2455 | mlog(0, "%s: got reco EX lock, but " | 2455 | mlog(0, "%s: got reco EX lock, but " |
2456 | "node got recovered already\n", dlm->name); | 2456 | "node got recovered already\n", dlm->name); |
2457 | if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { | 2457 | if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { |
2458 | mlog(ML_ERROR, "%s: new master is %u " | 2458 | mlog(ML_ERROR, "%s: new master is %u " |
2459 | "but no dead node!\n", | 2459 | "but no dead node!\n", |
2460 | dlm->name, dlm->reco.new_master); | 2460 | dlm->name, dlm->reco.new_master); |
2461 | BUG(); | 2461 | BUG(); |
2462 | } | 2462 | } |
@@ -2468,7 +2468,7 @@ again: | |||
2468 | * set the master and send the messages to begin recovery */ | 2468 | * set the master and send the messages to begin recovery */ |
2469 | if (!status) { | 2469 | if (!status) { |
2470 | mlog(0, "%s: dead=%u, this=%u, sending " | 2470 | mlog(0, "%s: dead=%u, this=%u, sending " |
2471 | "begin_reco now\n", dlm->name, | 2471 | "begin_reco now\n", dlm->name, |
2472 | dlm->reco.dead_node, dlm->node_num); | 2472 | dlm->reco.dead_node, dlm->node_num); |
2473 | status = dlm_send_begin_reco_message(dlm, | 2473 | status = dlm_send_begin_reco_message(dlm, |
2474 | dlm->reco.dead_node); | 2474 | dlm->reco.dead_node); |
@@ -2501,7 +2501,7 @@ again: | |||
2501 | mlog(0, "dlm=%s dlmlock says another node got it (this=%u)\n", | 2501 | mlog(0, "dlm=%s dlmlock says another node got it (this=%u)\n", |
2502 | dlm->name, dlm->node_num); | 2502 | dlm->name, dlm->node_num); |
2503 | /* another node is master. wait on | 2503 | /* another node is master. wait on |
2504 | * reco.new_master != O2NM_INVALID_NODE_NUM | 2504 | * reco.new_master != O2NM_INVALID_NODE_NUM |
2505 | * for at most one second */ | 2505 | * for at most one second */ |
2506 | wait_event_timeout(dlm->dlm_reco_thread_wq, | 2506 | wait_event_timeout(dlm->dlm_reco_thread_wq, |
2507 | dlm_reco_master_ready(dlm), | 2507 | dlm_reco_master_ready(dlm), |
@@ -2599,7 +2599,7 @@ retry: | |||
2599 | } | 2599 | } |
2600 | if (ret < 0) { | 2600 | if (ret < 0) { |
2601 | struct dlm_lock_resource *res; | 2601 | struct dlm_lock_resource *res; |
2602 | /* this is now a serious problem, possibly ENOMEM | 2602 | /* this is now a serious problem, possibly ENOMEM |
2603 | * in the network stack. must retry */ | 2603 | * in the network stack. must retry */ |
2604 | mlog_errno(ret); | 2604 | mlog_errno(ret); |
2605 | mlog(ML_ERROR, "begin reco of dlm %s to node %u " | 2605 | mlog(ML_ERROR, "begin reco of dlm %s to node %u " |
@@ -2612,7 +2612,7 @@ retry: | |||
2612 | } else { | 2612 | } else { |
2613 | mlog(ML_ERROR, "recovery lock not found\n"); | 2613 | mlog(ML_ERROR, "recovery lock not found\n"); |
2614 | } | 2614 | } |
2615 | /* sleep for a bit in hopes that we can avoid | 2615 | /* sleep for a bit in hopes that we can avoid |
2616 | * another ENOMEM */ | 2616 | * another ENOMEM */ |
2617 | msleep(100); | 2617 | msleep(100); |
2618 | goto retry; | 2618 | goto retry; |
@@ -2664,7 +2664,7 @@ int dlm_begin_reco_handler(struct o2net_msg *msg, u32 len, void *data, | |||
2664 | } | 2664 | } |
2665 | if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { | 2665 | if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { |
2666 | mlog(ML_NOTICE, "%s: dead_node previously set to %u, " | 2666 | mlog(ML_NOTICE, "%s: dead_node previously set to %u, " |
2667 | "node %u changing it to %u\n", dlm->name, | 2667 | "node %u changing it to %u\n", dlm->name, |
2668 | dlm->reco.dead_node, br->node_idx, br->dead_node); | 2668 | dlm->reco.dead_node, br->node_idx, br->dead_node); |
2669 | } | 2669 | } |
2670 | dlm_set_reco_master(dlm, br->node_idx); | 2670 | dlm_set_reco_master(dlm, br->node_idx); |
@@ -2730,8 +2730,8 @@ stage2: | |||
2730 | if (ret < 0) { | 2730 | if (ret < 0) { |
2731 | mlog_errno(ret); | 2731 | mlog_errno(ret); |
2732 | if (dlm_is_host_down(ret)) { | 2732 | if (dlm_is_host_down(ret)) { |
2733 | /* this has no effect on this recovery | 2733 | /* this has no effect on this recovery |
2734 | * session, so set the status to zero to | 2734 | * session, so set the status to zero to |
2735 | * finish out the last recovery */ | 2735 | * finish out the last recovery */ |
2736 | mlog(ML_ERROR, "node %u went down after this " | 2736 | mlog(ML_ERROR, "node %u went down after this " |
2737 | "node finished recovery.\n", nodenum); | 2737 | "node finished recovery.\n", nodenum); |
@@ -2768,7 +2768,7 @@ int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data, | |||
2768 | mlog(0, "%s: node %u finalizing recovery stage%d of " | 2768 | mlog(0, "%s: node %u finalizing recovery stage%d of " |
2769 | "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage, | 2769 | "node %u (%u:%u)\n", dlm->name, fr->node_idx, stage, |
2770 | fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); | 2770 | fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); |
2771 | 2771 | ||
2772 | spin_lock(&dlm->spinlock); | 2772 | spin_lock(&dlm->spinlock); |
2773 | 2773 | ||
2774 | if (dlm->reco.new_master != fr->node_idx) { | 2774 | if (dlm->reco.new_master != fr->node_idx) { |
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index 00f53b2aea76..49e29ecd0201 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c | |||
@@ -190,8 +190,8 @@ static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm, | |||
190 | actions &= ~(DLM_UNLOCK_REMOVE_LOCK| | 190 | actions &= ~(DLM_UNLOCK_REMOVE_LOCK| |
191 | DLM_UNLOCK_REGRANT_LOCK| | 191 | DLM_UNLOCK_REGRANT_LOCK| |
192 | DLM_UNLOCK_CLEAR_CONVERT_TYPE); | 192 | DLM_UNLOCK_CLEAR_CONVERT_TYPE); |
193 | } else if (status == DLM_RECOVERING || | 193 | } else if (status == DLM_RECOVERING || |
194 | status == DLM_MIGRATING || | 194 | status == DLM_MIGRATING || |
195 | status == DLM_FORWARD) { | 195 | status == DLM_FORWARD) { |
196 | /* must clear the actions because this unlock | 196 | /* must clear the actions because this unlock |
197 | * is about to be retried. cannot free or do | 197 | * is about to be retried. cannot free or do |
@@ -661,14 +661,14 @@ retry: | |||
661 | if (call_ast) { | 661 | if (call_ast) { |
662 | mlog(0, "calling unlockast(%p, %d)\n", data, status); | 662 | mlog(0, "calling unlockast(%p, %d)\n", data, status); |
663 | if (is_master) { | 663 | if (is_master) { |
664 | /* it is possible that there is one last bast | 664 | /* it is possible that there is one last bast |
665 | * pending. make sure it is flushed, then | 665 | * pending. make sure it is flushed, then |
666 | * call the unlockast. | 666 | * call the unlockast. |
667 | * not an issue if this is a mastered remotely, | 667 | * not an issue if this is a mastered remotely, |
668 | * since this lock has been removed from the | 668 | * since this lock has been removed from the |
669 | * lockres queues and cannot be found. */ | 669 | * lockres queues and cannot be found. */ |
670 | dlm_kick_thread(dlm, NULL); | 670 | dlm_kick_thread(dlm, NULL); |
671 | wait_event(dlm->ast_wq, | 671 | wait_event(dlm->ast_wq, |
672 | dlm_lock_basts_flushed(dlm, lock)); | 672 | dlm_lock_basts_flushed(dlm, lock)); |
673 | } | 673 | } |
674 | (*unlockast)(data, status); | 674 | (*unlockast)(data, status); |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index c5e4a49e3a12..172f4c6ce1be 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -3155,7 +3155,7 @@ out: | |||
3155 | /* Mark the lockres as being dropped. It will no longer be | 3155 | /* Mark the lockres as being dropped. It will no longer be |
3156 | * queued if blocking, but we still may have to wait on it | 3156 | * queued if blocking, but we still may have to wait on it |
3157 | * being dequeued from the downconvert thread before we can consider | 3157 | * being dequeued from the downconvert thread before we can consider |
3158 | * it safe to drop. | 3158 | * it safe to drop. |
3159 | * | 3159 | * |
3160 | * You can *not* attempt to call cluster_lock on this lockres anymore. */ | 3160 | * You can *not* attempt to call cluster_lock on this lockres anymore. */ |
3161 | void ocfs2_mark_lockres_freeing(struct ocfs2_lock_res *lockres) | 3161 | void ocfs2_mark_lockres_freeing(struct ocfs2_lock_res *lockres) |
diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 15713cbb865c..19ad145d2af3 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c | |||
@@ -239,7 +239,7 @@ static int ocfs2_encode_fh(struct dentry *dentry, u32 *fh_in, int *max_len, | |||
239 | mlog(0, "Encoding parent: blkno: %llu, generation: %u\n", | 239 | mlog(0, "Encoding parent: blkno: %llu, generation: %u\n", |
240 | (unsigned long long)blkno, generation); | 240 | (unsigned long long)blkno, generation); |
241 | } | 241 | } |
242 | 242 | ||
243 | *max_len = len; | 243 | *max_len = len; |
244 | 244 | ||
245 | bail: | 245 | bail: |
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 06ccf6a86d35..65e9375d2fb3 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -749,7 +749,7 @@ static int ocfs2_write_zero_page(struct inode *inode, | |||
749 | int ret; | 749 | int ret; |
750 | 750 | ||
751 | offset = (size & (PAGE_CACHE_SIZE-1)); /* Within page */ | 751 | offset = (size & (PAGE_CACHE_SIZE-1)); /* Within page */ |
752 | /* ugh. in prepare/commit_write, if from==to==start of block, we | 752 | /* ugh. in prepare/commit_write, if from==to==start of block, we |
753 | ** skip the prepare. make sure we never send an offset for the start | 753 | ** skip the prepare. make sure we never send an offset for the start |
754 | ** of a block | 754 | ** of a block |
755 | */ | 755 | */ |
@@ -1779,7 +1779,7 @@ static int ocfs2_prepare_inode_for_write(struct dentry *dentry, | |||
1779 | struct inode *inode = dentry->d_inode; | 1779 | struct inode *inode = dentry->d_inode; |
1780 | loff_t saved_pos, end; | 1780 | loff_t saved_pos, end; |
1781 | 1781 | ||
1782 | /* | 1782 | /* |
1783 | * We start with a read level meta lock and only jump to an ex | 1783 | * We start with a read level meta lock and only jump to an ex |
1784 | * if we need to make modifications here. | 1784 | * if we need to make modifications here. |
1785 | */ | 1785 | */ |
@@ -2033,7 +2033,7 @@ out_dio: | |||
2033 | pos + count - 1); | 2033 | pos + count - 1); |
2034 | } | 2034 | } |
2035 | 2035 | ||
2036 | /* | 2036 | /* |
2037 | * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io | 2037 | * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io |
2038 | * function pointer which is called when o_direct io completes so that | 2038 | * function pointer which is called when o_direct io completes so that |
2039 | * it can unlock our rw lock. (it's the clustered equivalent of | 2039 | * it can unlock our rw lock. (it's the clustered equivalent of |
@@ -2198,7 +2198,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, | |||
2198 | goto bail; | 2198 | goto bail; |
2199 | } | 2199 | } |
2200 | 2200 | ||
2201 | /* | 2201 | /* |
2202 | * buffered reads protect themselves in ->readpage(). O_DIRECT reads | 2202 | * buffered reads protect themselves in ->readpage(). O_DIRECT reads |
2203 | * need locks to protect pending reads from racing with truncate. | 2203 | * need locks to protect pending reads from racing with truncate. |
2204 | */ | 2204 | */ |
@@ -2220,10 +2220,10 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, | |||
2220 | * We're fine letting folks race truncates and extending | 2220 | * We're fine letting folks race truncates and extending |
2221 | * writes with read across the cluster, just like they can | 2221 | * writes with read across the cluster, just like they can |
2222 | * locally. Hence no rw_lock during read. | 2222 | * locally. Hence no rw_lock during read. |
2223 | * | 2223 | * |
2224 | * Take and drop the meta data lock to update inode fields | 2224 | * Take and drop the meta data lock to update inode fields |
2225 | * like i_size. This allows the checks down below | 2225 | * like i_size. This allows the checks down below |
2226 | * generic_file_aio_read() a chance of actually working. | 2226 | * generic_file_aio_read() a chance of actually working. |
2227 | */ | 2227 | */ |
2228 | ret = ocfs2_inode_lock_atime(inode, filp->f_vfsmnt, &lock_level); | 2228 | ret = ocfs2_inode_lock_atime(inode, filp->f_vfsmnt, &lock_level); |
2229 | if (ret < 0) { | 2229 | if (ret < 0) { |
@@ -2248,7 +2248,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, | |||
2248 | bail: | 2248 | bail: |
2249 | if (have_alloc_sem) | 2249 | if (have_alloc_sem) |
2250 | up_read(&inode->i_alloc_sem); | 2250 | up_read(&inode->i_alloc_sem); |
2251 | if (rw_level != -1) | 2251 | if (rw_level != -1) |
2252 | ocfs2_rw_unlock(inode, rw_level); | 2252 | ocfs2_rw_unlock(inode, rw_level); |
2253 | mlog_exit(ret); | 2253 | mlog_exit(ret); |
2254 | 2254 | ||
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 0297fb8982b8..88459bdd1ff3 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -475,7 +475,7 @@ static int ocfs2_read_locked_inode(struct inode *inode, | |||
475 | if (args->fi_flags & OCFS2_FI_FLAG_ORPHAN_RECOVERY) { | 475 | if (args->fi_flags & OCFS2_FI_FLAG_ORPHAN_RECOVERY) { |
476 | status = ocfs2_try_open_lock(inode, 0); | 476 | status = ocfs2_try_open_lock(inode, 0); |
477 | if (status) { | 477 | if (status) { |
478 | make_bad_inode(inode); | 478 | make_bad_inode(inode); |
479 | return status; | 479 | return status; |
480 | } | 480 | } |
481 | } | 481 | } |
@@ -684,7 +684,7 @@ bail: | |||
684 | return status; | 684 | return status; |
685 | } | 685 | } |
686 | 686 | ||
687 | /* | 687 | /* |
688 | * Serialize with orphan dir recovery. If the process doing | 688 | * Serialize with orphan dir recovery. If the process doing |
689 | * recovery on this orphan dir does an iget() with the dir | 689 | * recovery on this orphan dir does an iget() with the dir |
690 | * i_mutex held, we'll deadlock here. Instead we detect this | 690 | * i_mutex held, we'll deadlock here. Instead we detect this |
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index bf34c491ae96..9336c60e3a36 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -2034,7 +2034,7 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb, | |||
2034 | status = -ENOENT; | 2034 | status = -ENOENT; |
2035 | mlog_errno(status); | 2035 | mlog_errno(status); |
2036 | return status; | 2036 | return status; |
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | mutex_lock(&orphan_dir_inode->i_mutex); | 2039 | mutex_lock(&orphan_dir_inode->i_mutex); |
2040 | status = ocfs2_inode_lock(orphan_dir_inode, NULL, 0); | 2040 | status = ocfs2_inode_lock(orphan_dir_inode, NULL, 0); |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 26069917a9f5..755cd49a5ef3 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1062,7 +1062,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
1062 | "file system, but write access is " | 1062 | "file system, but write access is " |
1063 | "unavailable.\n"); | 1063 | "unavailable.\n"); |
1064 | else | 1064 | else |
1065 | mlog_errno(status); | 1065 | mlog_errno(status); |
1066 | goto read_super_error; | 1066 | goto read_super_error; |
1067 | } | 1067 | } |
1068 | 1068 | ||
diff --git a/fs/ocfs2/uptodate.c b/fs/ocfs2/uptodate.c index c61369342a27..a0a120e82b97 100644 --- a/fs/ocfs2/uptodate.c +++ b/fs/ocfs2/uptodate.c | |||
@@ -267,8 +267,8 @@ static int ocfs2_buffer_cached(struct ocfs2_caching_info *ci, | |||
267 | } | 267 | } |
268 | 268 | ||
269 | /* Warning: even if it returns true, this does *not* guarantee that | 269 | /* Warning: even if it returns true, this does *not* guarantee that |
270 | * the block is stored in our inode metadata cache. | 270 | * the block is stored in our inode metadata cache. |
271 | * | 271 | * |
272 | * This can be called under lock_buffer() | 272 | * This can be called under lock_buffer() |
273 | */ | 273 | */ |
274 | int ocfs2_buffer_uptodate(struct ocfs2_caching_info *ci, | 274 | int ocfs2_buffer_uptodate(struct ocfs2_caching_info *ci, |