diff options
Diffstat (limited to 'fs/ocfs2/cluster')
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 9 | ||||
-rw-r--r-- | fs/ocfs2/cluster/masklog.c | 20 | ||||
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 105 | ||||
-rw-r--r-- | fs/ocfs2/cluster/quorum.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 12 |
5 files changed, 27 insertions, 123 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index b108e863d8f6..643720209a98 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -367,11 +367,7 @@ static inline void o2hb_bio_wait_dec(struct o2hb_bio_wait_ctxt *wc, | |||
367 | static void o2hb_wait_on_io(struct o2hb_region *reg, | 367 | static void o2hb_wait_on_io(struct o2hb_region *reg, |
368 | struct o2hb_bio_wait_ctxt *wc) | 368 | struct o2hb_bio_wait_ctxt *wc) |
369 | { | 369 | { |
370 | struct address_space *mapping = reg->hr_bdev->bd_inode->i_mapping; | ||
371 | |||
372 | blk_run_address_space(mapping); | ||
373 | o2hb_bio_wait_dec(wc, 1); | 370 | o2hb_bio_wait_dec(wc, 1); |
374 | |||
375 | wait_for_completion(&wc->wc_io_complete); | 371 | wait_for_completion(&wc->wc_io_complete); |
376 | } | 372 | } |
377 | 373 | ||
@@ -1658,8 +1654,6 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg) | |||
1658 | struct o2hb_disk_slot *slot; | 1654 | struct o2hb_disk_slot *slot; |
1659 | struct o2hb_disk_heartbeat_block *hb_block; | 1655 | struct o2hb_disk_heartbeat_block *hb_block; |
1660 | 1656 | ||
1661 | mlog_entry_void(); | ||
1662 | |||
1663 | ret = o2hb_read_slots(reg, reg->hr_blocks); | 1657 | ret = o2hb_read_slots(reg, reg->hr_blocks); |
1664 | if (ret) { | 1658 | if (ret) { |
1665 | mlog_errno(ret); | 1659 | mlog_errno(ret); |
@@ -1681,7 +1675,6 @@ static int o2hb_populate_slot_data(struct o2hb_region *reg) | |||
1681 | } | 1675 | } |
1682 | 1676 | ||
1683 | out: | 1677 | out: |
1684 | mlog_exit(ret); | ||
1685 | return ret; | 1678 | return ret; |
1686 | } | 1679 | } |
1687 | 1680 | ||
@@ -2282,7 +2275,7 @@ void o2hb_free_hb_set(struct config_group *group) | |||
2282 | kfree(hs); | 2275 | kfree(hs); |
2283 | } | 2276 | } |
2284 | 2277 | ||
2285 | /* hb callback registration and issueing */ | 2278 | /* hb callback registration and issuing */ |
2286 | 2279 | ||
2287 | static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type) | 2280 | static struct o2hb_callback *hbcall_from_type(enum o2hb_callback_type type) |
2288 | { | 2281 | { |
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c index 6c61771469af..07ac24fd9252 100644 --- a/fs/ocfs2/cluster/masklog.c +++ b/fs/ocfs2/cluster/masklog.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | struct mlog_bits mlog_and_bits = MLOG_BITS_RHS(MLOG_INITIAL_AND_MASK); | 31 | struct mlog_bits mlog_and_bits = MLOG_BITS_RHS(MLOG_INITIAL_AND_MASK); |
32 | EXPORT_SYMBOL_GPL(mlog_and_bits); | 32 | EXPORT_SYMBOL_GPL(mlog_and_bits); |
33 | struct mlog_bits mlog_not_bits = MLOG_BITS_RHS(MLOG_INITIAL_NOT_MASK); | 33 | struct mlog_bits mlog_not_bits = MLOG_BITS_RHS(0); |
34 | EXPORT_SYMBOL_GPL(mlog_not_bits); | 34 | EXPORT_SYMBOL_GPL(mlog_not_bits); |
35 | 35 | ||
36 | static ssize_t mlog_mask_show(u64 mask, char *buf) | 36 | static ssize_t mlog_mask_show(u64 mask, char *buf) |
@@ -80,8 +80,6 @@ struct mlog_attribute { | |||
80 | } | 80 | } |
81 | 81 | ||
82 | static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { | 82 | static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { |
83 | define_mask(ENTRY), | ||
84 | define_mask(EXIT), | ||
85 | define_mask(TCP), | 83 | define_mask(TCP), |
86 | define_mask(MSG), | 84 | define_mask(MSG), |
87 | define_mask(SOCKET), | 85 | define_mask(SOCKET), |
@@ -93,27 +91,11 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { | |||
93 | define_mask(DLM_THREAD), | 91 | define_mask(DLM_THREAD), |
94 | define_mask(DLM_MASTER), | 92 | define_mask(DLM_MASTER), |
95 | define_mask(DLM_RECOVERY), | 93 | define_mask(DLM_RECOVERY), |
96 | define_mask(AIO), | ||
97 | define_mask(JOURNAL), | ||
98 | define_mask(DISK_ALLOC), | ||
99 | define_mask(SUPER), | ||
100 | define_mask(FILE_IO), | ||
101 | define_mask(EXTENT_MAP), | ||
102 | define_mask(DLM_GLUE), | 94 | define_mask(DLM_GLUE), |
103 | define_mask(BH_IO), | ||
104 | define_mask(UPTODATE), | ||
105 | define_mask(NAMEI), | ||
106 | define_mask(INODE), | ||
107 | define_mask(VOTE), | 95 | define_mask(VOTE), |
108 | define_mask(DCACHE), | ||
109 | define_mask(CONN), | 96 | define_mask(CONN), |
110 | define_mask(QUORUM), | 97 | define_mask(QUORUM), |
111 | define_mask(EXPORT), | ||
112 | define_mask(XATTR), | ||
113 | define_mask(QUOTA), | ||
114 | define_mask(REFCOUNT), | ||
115 | define_mask(BASTS), | 98 | define_mask(BASTS), |
116 | define_mask(RESERVATIONS), | ||
117 | define_mask(CLUSTER), | 99 | define_mask(CLUSTER), |
118 | define_mask(ERROR), | 100 | define_mask(ERROR), |
119 | define_mask(NOTICE), | 101 | define_mask(NOTICE), |
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 34d6544357d9..baa2b9ef7eef 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -82,41 +82,23 @@ | |||
82 | 82 | ||
83 | /* bits that are frequently given and infrequently matched in the low word */ | 83 | /* bits that are frequently given and infrequently matched in the low word */ |
84 | /* NOTE: If you add a flag, you need to also update masklog.c! */ | 84 | /* NOTE: If you add a flag, you need to also update masklog.c! */ |
85 | #define ML_ENTRY 0x0000000000000001ULL /* func call entry */ | 85 | #define ML_TCP 0x0000000000000001ULL /* net cluster/tcp.c */ |
86 | #define ML_EXIT 0x0000000000000002ULL /* func call exit */ | 86 | #define ML_MSG 0x0000000000000002ULL /* net network messages */ |
87 | #define ML_TCP 0x0000000000000004ULL /* net cluster/tcp.c */ | 87 | #define ML_SOCKET 0x0000000000000004ULL /* net socket lifetime */ |
88 | #define ML_MSG 0x0000000000000008ULL /* net network messages */ | 88 | #define ML_HEARTBEAT 0x0000000000000008ULL /* hb all heartbeat tracking */ |
89 | #define ML_SOCKET 0x0000000000000010ULL /* net socket lifetime */ | 89 | #define ML_HB_BIO 0x0000000000000010ULL /* hb io tracing */ |
90 | #define ML_HEARTBEAT 0x0000000000000020ULL /* hb all heartbeat tracking */ | 90 | #define ML_DLMFS 0x0000000000000020ULL /* dlm user dlmfs */ |
91 | #define ML_HB_BIO 0x0000000000000040ULL /* hb io tracing */ | 91 | #define ML_DLM 0x0000000000000040ULL /* dlm general debugging */ |
92 | #define ML_DLMFS 0x0000000000000080ULL /* dlm user dlmfs */ | 92 | #define ML_DLM_DOMAIN 0x0000000000000080ULL /* dlm domain debugging */ |
93 | #define ML_DLM 0x0000000000000100ULL /* dlm general debugging */ | 93 | #define ML_DLM_THREAD 0x0000000000000100ULL /* dlm domain thread */ |
94 | #define ML_DLM_DOMAIN 0x0000000000000200ULL /* dlm domain debugging */ | 94 | #define ML_DLM_MASTER 0x0000000000000200ULL /* dlm master functions */ |
95 | #define ML_DLM_THREAD 0x0000000000000400ULL /* dlm domain thread */ | 95 | #define ML_DLM_RECOVERY 0x0000000000000400ULL /* dlm master functions */ |
96 | #define ML_DLM_MASTER 0x0000000000000800ULL /* dlm master functions */ | 96 | #define ML_DLM_GLUE 0x0000000000000800ULL /* ocfs2 dlm glue layer */ |
97 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ | 97 | #define ML_VOTE 0x0000000000001000ULL /* ocfs2 node messaging */ |
98 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ | 98 | #define ML_CONN 0x0000000000002000ULL /* net connection management */ |
99 | #define ML_JOURNAL 0x0000000000004000ULL /* ocfs2 journalling functions */ | 99 | #define ML_QUORUM 0x0000000000004000ULL /* net connection quorum */ |
100 | #define ML_DISK_ALLOC 0x0000000000008000ULL /* ocfs2 disk allocation */ | 100 | #define ML_BASTS 0x0000000000008000ULL /* dlmglue asts and basts */ |
101 | #define ML_SUPER 0x0000000000010000ULL /* ocfs2 mount / umount */ | 101 | #define ML_CLUSTER 0x0000000000010000ULL /* cluster stack */ |
102 | #define ML_FILE_IO 0x0000000000020000ULL /* ocfs2 file I/O */ | ||
103 | #define ML_EXTENT_MAP 0x0000000000040000ULL /* ocfs2 extent map caching */ | ||
104 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ | ||
105 | #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ | ||
106 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ | ||
107 | #define ML_NAMEI 0x0000000000400000ULL /* ocfs2 directory / namespace */ | ||
108 | #define ML_INODE 0x0000000000800000ULL /* ocfs2 inode manipulation */ | ||
109 | #define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */ | ||
110 | #define ML_DCACHE 0x0000000002000000ULL /* ocfs2 dcache operations */ | ||
111 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ | ||
112 | #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ | ||
113 | #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ | ||
114 | #define ML_XATTR 0x0000000020000000ULL /* ocfs2 extended attributes */ | ||
115 | #define ML_QUOTA 0x0000000040000000ULL /* ocfs2 quota operations */ | ||
116 | #define ML_REFCOUNT 0x0000000080000000ULL /* refcount tree operations */ | ||
117 | #define ML_BASTS 0x0000000100000000ULL /* dlmglue asts and basts */ | ||
118 | #define ML_RESERVATIONS 0x0000000200000000ULL /* ocfs2 alloc reservations */ | ||
119 | #define ML_CLUSTER 0x0000000400000000ULL /* cluster stack */ | ||
120 | 102 | ||
121 | /* bits that are infrequently given and frequently matched in the high word */ | 103 | /* bits that are infrequently given and frequently matched in the high word */ |
122 | #define ML_ERROR 0x1000000000000000ULL /* sent to KERN_ERR */ | 104 | #define ML_ERROR 0x1000000000000000ULL /* sent to KERN_ERR */ |
@@ -124,7 +106,6 @@ | |||
124 | #define ML_KTHREAD 0x4000000000000000ULL /* kernel thread activity */ | 106 | #define ML_KTHREAD 0x4000000000000000ULL /* kernel thread activity */ |
125 | 107 | ||
126 | #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) | 108 | #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) |
127 | #define MLOG_INITIAL_NOT_MASK (ML_ENTRY|ML_EXIT) | ||
128 | #ifndef MLOG_MASK_PREFIX | 109 | #ifndef MLOG_MASK_PREFIX |
129 | #define MLOG_MASK_PREFIX 0 | 110 | #define MLOG_MASK_PREFIX 0 |
130 | #endif | 111 | #endif |
@@ -222,58 +203,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; | |||
222 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ | 203 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ |
223 | } while (0) | 204 | } while (0) |
224 | 205 | ||
225 | #if defined(CONFIG_OCFS2_DEBUG_MASKLOG) | ||
226 | #define mlog_entry(fmt, args...) do { \ | ||
227 | mlog(ML_ENTRY, "ENTRY:" fmt , ##args); \ | ||
228 | } while (0) | ||
229 | |||
230 | #define mlog_entry_void() do { \ | ||
231 | mlog(ML_ENTRY, "ENTRY:\n"); \ | ||
232 | } while (0) | ||
233 | |||
234 | /* | ||
235 | * We disable this for sparse. | ||
236 | */ | ||
237 | #if !defined(__CHECKER__) | ||
238 | #define mlog_exit(st) do { \ | ||
239 | if (__builtin_types_compatible_p(typeof(st), unsigned long)) \ | ||
240 | mlog(ML_EXIT, "EXIT: %lu\n", (unsigned long) (st)); \ | ||
241 | else if (__builtin_types_compatible_p(typeof(st), signed long)) \ | ||
242 | mlog(ML_EXIT, "EXIT: %ld\n", (signed long) (st)); \ | ||
243 | else if (__builtin_types_compatible_p(typeof(st), unsigned int) \ | ||
244 | || __builtin_types_compatible_p(typeof(st), unsigned short) \ | ||
245 | || __builtin_types_compatible_p(typeof(st), unsigned char)) \ | ||
246 | mlog(ML_EXIT, "EXIT: %u\n", (unsigned int) (st)); \ | ||
247 | else if (__builtin_types_compatible_p(typeof(st), signed int) \ | ||
248 | || __builtin_types_compatible_p(typeof(st), signed short) \ | ||
249 | || __builtin_types_compatible_p(typeof(st), signed char)) \ | ||
250 | mlog(ML_EXIT, "EXIT: %d\n", (signed int) (st)); \ | ||
251 | else if (__builtin_types_compatible_p(typeof(st), long long)) \ | ||
252 | mlog(ML_EXIT, "EXIT: %lld\n", (long long) (st)); \ | ||
253 | else \ | ||
254 | mlog(ML_EXIT, "EXIT: %llu\n", (unsigned long long) (st)); \ | ||
255 | } while (0) | ||
256 | #else | ||
257 | #define mlog_exit(st) do { \ | ||
258 | mlog(ML_EXIT, "EXIT: %lld\n", (long long) (st)); \ | ||
259 | } while (0) | ||
260 | #endif | ||
261 | |||
262 | #define mlog_exit_ptr(ptr) do { \ | ||
263 | mlog(ML_EXIT, "EXIT: %p\n", ptr); \ | ||
264 | } while (0) | ||
265 | |||
266 | #define mlog_exit_void() do { \ | ||
267 | mlog(ML_EXIT, "EXIT\n"); \ | ||
268 | } while (0) | ||
269 | #else | ||
270 | #define mlog_entry(...) do { } while (0) | ||
271 | #define mlog_entry_void(...) do { } while (0) | ||
272 | #define mlog_exit(...) do { } while (0) | ||
273 | #define mlog_exit_ptr(...) do { } while (0) | ||
274 | #define mlog_exit_void(...) do { } while (0) | ||
275 | #endif /* defined(CONFIG_OCFS2_DEBUG_MASKLOG) */ | ||
276 | |||
277 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ | 206 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ |
278 | if (cond) { \ | 207 | if (cond) { \ |
279 | mlog(ML_ERROR, "bug expression: " #cond "\n"); \ | 208 | mlog(ML_ERROR, "bug expression: " #cond "\n"); \ |
diff --git a/fs/ocfs2/cluster/quorum.c b/fs/ocfs2/cluster/quorum.c index a87366750f23..8f9cea1597af 100644 --- a/fs/ocfs2/cluster/quorum.c +++ b/fs/ocfs2/cluster/quorum.c | |||
@@ -89,7 +89,7 @@ static void o2quo_fence_self(void) | |||
89 | }; | 89 | }; |
90 | } | 90 | } |
91 | 91 | ||
92 | /* Indicate that a timeout occured on a hearbeat region write. The | 92 | /* Indicate that a timeout occurred on a hearbeat region write. The |
93 | * other nodes in the cluster may consider us dead at that time so we | 93 | * other nodes in the cluster may consider us dead at that time so we |
94 | * want to "fence" ourselves so that we don't scribble on the disk | 94 | * want to "fence" ourselves so that we don't scribble on the disk |
95 | * after they think they've recovered us. This can't solve all | 95 | * after they think they've recovered us. This can't solve all |
@@ -261,7 +261,7 @@ void o2quo_hb_still_up(u8 node) | |||
261 | spin_unlock(&qs->qs_lock); | 261 | spin_unlock(&qs->qs_lock); |
262 | } | 262 | } |
263 | 263 | ||
264 | /* This is analagous to hb_up. as a node's connection comes up we delay the | 264 | /* This is analogous to hb_up. as a node's connection comes up we delay the |
265 | * quorum decision until we see it heartbeating. the hold will be droped in | 265 | * quorum decision until we see it heartbeating. the hold will be droped in |
266 | * hb_up or hb_down. it might be perpetuated by con_err until hb_down. if | 266 | * hb_up or hb_down. it might be perpetuated by con_err until hb_down. if |
267 | * it's already heartbeating we we might be dropping a hold that conn_up got. | 267 | * it's already heartbeating we we might be dropping a hold that conn_up got. |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 3b11cb1e38fc..db5ee4b4f47a 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -210,10 +210,6 @@ static inline void o2net_set_func_stop_time(struct o2net_sock_container *sc) | |||
210 | sc->sc_tv_func_stop = ktime_get(); | 210 | sc->sc_tv_func_stop = ktime_get(); |
211 | } | 211 | } |
212 | 212 | ||
213 | static ktime_t o2net_get_func_run_time(struct o2net_sock_container *sc) | ||
214 | { | ||
215 | return ktime_sub(sc->sc_tv_func_stop, sc->sc_tv_func_start); | ||
216 | } | ||
217 | #else /* CONFIG_DEBUG_FS */ | 213 | #else /* CONFIG_DEBUG_FS */ |
218 | # define o2net_init_nst(a, b, c, d, e) | 214 | # define o2net_init_nst(a, b, c, d, e) |
219 | # define o2net_set_nst_sock_time(a) | 215 | # define o2net_set_nst_sock_time(a) |
@@ -227,10 +223,14 @@ static ktime_t o2net_get_func_run_time(struct o2net_sock_container *sc) | |||
227 | # define o2net_set_advance_stop_time(a) | 223 | # define o2net_set_advance_stop_time(a) |
228 | # define o2net_set_func_start_time(a) | 224 | # define o2net_set_func_start_time(a) |
229 | # define o2net_set_func_stop_time(a) | 225 | # define o2net_set_func_stop_time(a) |
230 | # define o2net_get_func_run_time(a) (ktime_t)0 | ||
231 | #endif /* CONFIG_DEBUG_FS */ | 226 | #endif /* CONFIG_DEBUG_FS */ |
232 | 227 | ||
233 | #ifdef CONFIG_OCFS2_FS_STATS | 228 | #ifdef CONFIG_OCFS2_FS_STATS |
229 | static ktime_t o2net_get_func_run_time(struct o2net_sock_container *sc) | ||
230 | { | ||
231 | return ktime_sub(sc->sc_tv_func_stop, sc->sc_tv_func_start); | ||
232 | } | ||
233 | |||
234 | static void o2net_update_send_stats(struct o2net_send_tracking *nst, | 234 | static void o2net_update_send_stats(struct o2net_send_tracking *nst, |
235 | struct o2net_sock_container *sc) | 235 | struct o2net_sock_container *sc) |
236 | { | 236 | { |
@@ -565,7 +565,7 @@ static void o2net_set_nn_state(struct o2net_node *nn, | |||
565 | * the work queue actually being up. */ | 565 | * the work queue actually being up. */ |
566 | if (!valid && o2net_wq) { | 566 | if (!valid && o2net_wq) { |
567 | unsigned long delay; | 567 | unsigned long delay; |
568 | /* delay if we're withing a RECONNECT_DELAY of the | 568 | /* delay if we're within a RECONNECT_DELAY of the |
569 | * last attempt */ | 569 | * last attempt */ |
570 | delay = (nn->nn_last_connect_attempt + | 570 | delay = (nn->nn_last_connect_attempt + |
571 | msecs_to_jiffies(o2net_reconnect_delay())) | 571 | msecs_to_jiffies(o2net_reconnect_delay())) |