diff options
author | Tao Ma <boyu.mt@taobao.com> | 2011-02-23 08:29:08 -0500 |
---|---|---|
committer | Tao Ma <boyu.mt@taobao.com> | 2011-02-23 08:29:08 -0500 |
commit | 32a42d392bf9b8f90f41434ccb3605e958b16251 (patch) | |
tree | 56c8db7307fd74340635817d692a0fcddb5eece2 | |
parent | b5770f98b00e94dd573e3438427de09733fe2039 (diff) |
ocfs2: Remove masklog ML_SUPER.
Remove mlog(0) from fs/ocfs2/super.c and the masklog SUPER.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
-rw-r--r-- | fs/ocfs2/cluster/masklog.c | 1 | ||||
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 1 | ||||
-rw-r--r-- | fs/ocfs2/ocfs2_trace.h | 108 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 29 |
4 files changed, 118 insertions, 21 deletions
diff --git a/fs/ocfs2/cluster/masklog.c b/fs/ocfs2/cluster/masklog.c index c5ba4373d863..ffc0de62a031 100644 --- a/fs/ocfs2/cluster/masklog.c +++ b/fs/ocfs2/cluster/masklog.c | |||
@@ -93,7 +93,6 @@ static struct mlog_attribute mlog_attrs[MLOG_MAX_BITS] = { | |||
93 | define_mask(DLM_RECOVERY), | 93 | define_mask(DLM_RECOVERY), |
94 | define_mask(AIO), | 94 | define_mask(AIO), |
95 | define_mask(JOURNAL), | 95 | define_mask(JOURNAL), |
96 | define_mask(SUPER), | ||
97 | define_mask(DLM_GLUE), | 96 | define_mask(DLM_GLUE), |
98 | define_mask(BH_IO), | 97 | define_mask(BH_IO), |
99 | define_mask(UPTODATE), | 98 | define_mask(UPTODATE), |
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index e4ca487078b3..98d4af95c8fe 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -95,7 +95,6 @@ | |||
95 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ | 95 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ |
96 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ | 96 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ |
97 | #define ML_JOURNAL 0x0000000000004000ULL /* ocfs2 journalling functions */ | 97 | #define ML_JOURNAL 0x0000000000004000ULL /* ocfs2 journalling functions */ |
98 | #define ML_SUPER 0x0000000000010000ULL /* ocfs2 mount / umount */ | ||
99 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ | 98 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ |
100 | #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ | 99 | #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ |
101 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ | 100 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ |
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h index 876b119d3656..75900635109b 100644 --- a/fs/ocfs2/ocfs2_trace.h +++ b/fs/ocfs2/ocfs2_trace.h | |||
@@ -57,6 +57,23 @@ DEFINE_EVENT(ocfs2__ull, name, \ | |||
57 | TP_PROTO(unsigned long long num), \ | 57 | TP_PROTO(unsigned long long num), \ |
58 | TP_ARGS(num)) | 58 | TP_ARGS(num)) |
59 | 59 | ||
60 | DECLARE_EVENT_CLASS(ocfs2__pointer, | ||
61 | TP_PROTO(void *pointer), | ||
62 | TP_ARGS(pointer), | ||
63 | TP_STRUCT__entry( | ||
64 | __field(void *, pointer) | ||
65 | ), | ||
66 | TP_fast_assign( | ||
67 | __entry->pointer = pointer; | ||
68 | ), | ||
69 | TP_printk("%p", __entry->pointer) | ||
70 | ); | ||
71 | |||
72 | #define DEFINE_OCFS2_POINTER_EVENT(name) \ | ||
73 | DEFINE_EVENT(ocfs2__pointer, name, \ | ||
74 | TP_PROTO(void *pointer), \ | ||
75 | TP_ARGS(pointer)) | ||
76 | |||
60 | DECLARE_EVENT_CLASS(ocfs2__int_int, | 77 | DECLARE_EVENT_CLASS(ocfs2__int_int, |
61 | TP_PROTO(int value1, int value2), | 78 | TP_PROTO(int value1, int value2), |
62 | TP_ARGS(value1, value2), | 79 | TP_ARGS(value1, value2), |
@@ -1537,6 +1554,97 @@ DEFINE_OCFS2_INT_EVENT(ocfs2_do_node_down); | |||
1537 | 1554 | ||
1538 | /* End of trace events for fs/ocfs2/heartbeat.c. */ | 1555 | /* End of trace events for fs/ocfs2/heartbeat.c. */ |
1539 | 1556 | ||
1557 | /* Trace events for fs/ocfs2/super.c. */ | ||
1558 | |||
1559 | TRACE_EVENT(ocfs2_remount, | ||
1560 | TP_PROTO(unsigned long s_flags, unsigned long osb_flags, int flags), | ||
1561 | TP_ARGS(s_flags, osb_flags, flags), | ||
1562 | TP_STRUCT__entry( | ||
1563 | __field(unsigned long, s_flags) | ||
1564 | __field(unsigned long, osb_flags) | ||
1565 | __field(int, flags) | ||
1566 | ), | ||
1567 | TP_fast_assign( | ||
1568 | __entry->s_flags = s_flags; | ||
1569 | __entry->osb_flags = osb_flags; | ||
1570 | __entry->flags = flags; | ||
1571 | ), | ||
1572 | TP_printk("%lu %lu %d", __entry->s_flags, | ||
1573 | __entry->osb_flags, __entry->flags) | ||
1574 | ); | ||
1575 | |||
1576 | TRACE_EVENT(ocfs2_fill_super, | ||
1577 | TP_PROTO(void *sb, void *data, int silent), | ||
1578 | TP_ARGS(sb, data, silent), | ||
1579 | TP_STRUCT__entry( | ||
1580 | __field(void *, sb) | ||
1581 | __field(void *, data) | ||
1582 | __field(int, silent) | ||
1583 | ), | ||
1584 | TP_fast_assign( | ||
1585 | __entry->sb = sb; | ||
1586 | __entry->data = data; | ||
1587 | __entry->silent = silent; | ||
1588 | ), | ||
1589 | TP_printk("%p %p %d", __entry->sb, | ||
1590 | __entry->data, __entry->silent) | ||
1591 | ); | ||
1592 | |||
1593 | TRACE_EVENT(ocfs2_parse_options, | ||
1594 | TP_PROTO(int is_remount, char *options), | ||
1595 | TP_ARGS(is_remount, options), | ||
1596 | TP_STRUCT__entry( | ||
1597 | __field(int, is_remount) | ||
1598 | __string(options, options) | ||
1599 | ), | ||
1600 | TP_fast_assign( | ||
1601 | __entry->is_remount = is_remount; | ||
1602 | __assign_str(options, options); | ||
1603 | ), | ||
1604 | TP_printk("%d %s", __entry->is_remount, __get_str(options)) | ||
1605 | ); | ||
1606 | |||
1607 | DEFINE_OCFS2_POINTER_EVENT(ocfs2_put_super); | ||
1608 | |||
1609 | TRACE_EVENT(ocfs2_statfs, | ||
1610 | TP_PROTO(void *sb, void *buf), | ||
1611 | TP_ARGS(sb, buf), | ||
1612 | TP_STRUCT__entry( | ||
1613 | __field(void *, sb) | ||
1614 | __field(void *, buf) | ||
1615 | ), | ||
1616 | TP_fast_assign( | ||
1617 | __entry->sb = sb; | ||
1618 | __entry->buf = buf; | ||
1619 | ), | ||
1620 | TP_printk("%p %p", __entry->sb, __entry->buf) | ||
1621 | ); | ||
1622 | |||
1623 | DEFINE_OCFS2_POINTER_EVENT(ocfs2_dismount_volume); | ||
1624 | |||
1625 | TRACE_EVENT(ocfs2_initialize_super, | ||
1626 | TP_PROTO(char *label, char *uuid_str, unsigned long long root_dir, | ||
1627 | unsigned long long system_dir, int cluster_bits), | ||
1628 | TP_ARGS(label, uuid_str, root_dir, system_dir, cluster_bits), | ||
1629 | TP_STRUCT__entry( | ||
1630 | __string(label, label) | ||
1631 | __string(uuid_str, uuid_str) | ||
1632 | __field(unsigned long long, root_dir) | ||
1633 | __field(unsigned long long, system_dir) | ||
1634 | __field(int, cluster_bits) | ||
1635 | ), | ||
1636 | TP_fast_assign( | ||
1637 | __assign_str(label, label); | ||
1638 | __assign_str(uuid_str, uuid_str); | ||
1639 | __entry->root_dir = root_dir; | ||
1640 | __entry->system_dir = system_dir; | ||
1641 | __entry->cluster_bits = cluster_bits; | ||
1642 | ), | ||
1643 | TP_printk("%s %s %llu %llu %d", __get_str(label), __get_str(uuid_str), | ||
1644 | __entry->root_dir, __entry->system_dir, __entry->cluster_bits) | ||
1645 | ); | ||
1646 | |||
1647 | /* End of trace events for fs/ocfs2/super.c. */ | ||
1540 | #endif /* _TRACE_OCFS2_H */ | 1648 | #endif /* _TRACE_OCFS2_H */ |
1541 | 1649 | ||
1542 | /* This part must be outside protection */ | 1650 | /* This part must be outside protection */ |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index f7e73a029844..0e4083987d2b 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #define CREATE_TRACE_POINTS | 45 | #define CREATE_TRACE_POINTS |
46 | #include "ocfs2_trace.h" | 46 | #include "ocfs2_trace.h" |
47 | 47 | ||
48 | #define MLOG_MASK_PREFIX ML_SUPER | ||
49 | #include <cluster/masklog.h> | 48 | #include <cluster/masklog.h> |
50 | 49 | ||
51 | #include "ocfs2.h" | 50 | #include "ocfs2.h" |
@@ -680,12 +679,9 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) | |||
680 | } | 679 | } |
681 | 680 | ||
682 | if (*flags & MS_RDONLY) { | 681 | if (*flags & MS_RDONLY) { |
683 | mlog(0, "Going to ro mode.\n"); | ||
684 | sb->s_flags |= MS_RDONLY; | 682 | sb->s_flags |= MS_RDONLY; |
685 | osb->osb_flags |= OCFS2_OSB_SOFT_RO; | 683 | osb->osb_flags |= OCFS2_OSB_SOFT_RO; |
686 | } else { | 684 | } else { |
687 | mlog(0, "Making ro filesystem writeable.\n"); | ||
688 | |||
689 | if (osb->osb_flags & OCFS2_OSB_ERROR_FS) { | 685 | if (osb->osb_flags & OCFS2_OSB_ERROR_FS) { |
690 | mlog(ML_ERROR, "Cannot remount RDWR " | 686 | mlog(ML_ERROR, "Cannot remount RDWR " |
691 | "filesystem due to previous errors.\n"); | 687 | "filesystem due to previous errors.\n"); |
@@ -703,6 +699,7 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data) | |||
703 | sb->s_flags &= ~MS_RDONLY; | 699 | sb->s_flags &= ~MS_RDONLY; |
704 | osb->osb_flags &= ~OCFS2_OSB_SOFT_RO; | 700 | osb->osb_flags &= ~OCFS2_OSB_SOFT_RO; |
705 | } | 701 | } |
702 | trace_ocfs2_remount(sb->s_flags, osb->osb_flags, *flags); | ||
706 | unlock_osb: | 703 | unlock_osb: |
707 | spin_unlock(&osb->osb_lock); | 704 | spin_unlock(&osb->osb_lock); |
708 | /* Enable quota accounting after remounting RW */ | 705 | /* Enable quota accounting after remounting RW */ |
@@ -1028,7 +1025,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent) | |||
1028 | char nodestr[8]; | 1025 | char nodestr[8]; |
1029 | struct ocfs2_blockcheck_stats stats; | 1026 | struct ocfs2_blockcheck_stats stats; |
1030 | 1027 | ||
1031 | mlog(0, "%p, %p, %i", sb, data, silent); | 1028 | trace_ocfs2_fill_super(sb, data, silent); |
1032 | 1029 | ||
1033 | if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) { | 1030 | if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) { |
1034 | status = -EINVAL; | 1031 | status = -EINVAL; |
@@ -1315,8 +1312,7 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
1315 | char *p; | 1312 | char *p; |
1316 | u32 tmp; | 1313 | u32 tmp; |
1317 | 1314 | ||
1318 | mlog(0, "remount: %d, options: \"%s\"\n", is_remount, | 1315 | trace_ocfs2_parse_options(is_remount, options ? options : "(none)"); |
1319 | options ? options : "(none)"); | ||
1320 | 1316 | ||
1321 | mopt->commit_interval = 0; | 1317 | mopt->commit_interval = 0; |
1322 | mopt->mount_opt = OCFS2_MOUNT_NOINTR; | 1318 | mopt->mount_opt = OCFS2_MOUNT_NOINTR; |
@@ -1692,7 +1688,7 @@ static void __exit ocfs2_exit(void) | |||
1692 | 1688 | ||
1693 | static void ocfs2_put_super(struct super_block *sb) | 1689 | static void ocfs2_put_super(struct super_block *sb) |
1694 | { | 1690 | { |
1695 | mlog(0, "(0x%p)\n", sb); | 1691 | trace_ocfs2_put_super(sb); |
1696 | 1692 | ||
1697 | ocfs2_sync_blockdev(sb); | 1693 | ocfs2_sync_blockdev(sb); |
1698 | ocfs2_dismount_volume(sb, 0); | 1694 | ocfs2_dismount_volume(sb, 0); |
@@ -1707,7 +1703,7 @@ static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
1707 | struct buffer_head *bh = NULL; | 1703 | struct buffer_head *bh = NULL; |
1708 | struct inode *inode = NULL; | 1704 | struct inode *inode = NULL; |
1709 | 1705 | ||
1710 | mlog(0, "(%p, %p)\n", dentry->d_sb, buf); | 1706 | trace_ocfs2_statfs(dentry->d_sb, buf); |
1711 | 1707 | ||
1712 | osb = OCFS2_SB(dentry->d_sb); | 1708 | osb = OCFS2_SB(dentry->d_sb); |
1713 | 1709 | ||
@@ -1928,7 +1924,7 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err) | |||
1928 | struct ocfs2_super *osb = NULL; | 1924 | struct ocfs2_super *osb = NULL; |
1929 | char nodestr[8]; | 1925 | char nodestr[8]; |
1930 | 1926 | ||
1931 | mlog(0, "(0x%p)\n", sb); | 1927 | trace_ocfs2_dismount_volume(sb); |
1932 | 1928 | ||
1933 | BUG_ON(!sb); | 1929 | BUG_ON(!sb); |
1934 | osb = OCFS2_SB(sb); | 1930 | osb = OCFS2_SB(sb); |
@@ -2143,7 +2139,6 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2143 | status = -EINVAL; | 2139 | status = -EINVAL; |
2144 | goto bail; | 2140 | goto bail; |
2145 | } | 2141 | } |
2146 | mlog(0, "max_slots for this device: %u\n", osb->max_slots); | ||
2147 | 2142 | ||
2148 | ocfs2_orphan_scan_init(osb); | 2143 | ocfs2_orphan_scan_init(osb); |
2149 | 2144 | ||
@@ -2282,7 +2277,6 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2282 | osb->s_clustersize_bits = | 2277 | osb->s_clustersize_bits = |
2283 | le32_to_cpu(di->id2.i_super.s_clustersize_bits); | 2278 | le32_to_cpu(di->id2.i_super.s_clustersize_bits); |
2284 | osb->s_clustersize = 1 << osb->s_clustersize_bits; | 2279 | osb->s_clustersize = 1 << osb->s_clustersize_bits; |
2285 | mlog(0, "clusterbits=%d\n", osb->s_clustersize_bits); | ||
2286 | 2280 | ||
2287 | if (osb->s_clustersize < OCFS2_MIN_CLUSTERSIZE || | 2281 | if (osb->s_clustersize < OCFS2_MIN_CLUSTERSIZE || |
2288 | osb->s_clustersize > OCFS2_MAX_CLUSTERSIZE) { | 2282 | osb->s_clustersize > OCFS2_MAX_CLUSTERSIZE) { |
@@ -2321,11 +2315,10 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2321 | le64_to_cpu(di->id2.i_super.s_first_cluster_group); | 2315 | le64_to_cpu(di->id2.i_super.s_first_cluster_group); |
2322 | osb->fs_generation = le32_to_cpu(di->i_fs_generation); | 2316 | osb->fs_generation = le32_to_cpu(di->i_fs_generation); |
2323 | osb->uuid_hash = le32_to_cpu(di->id2.i_super.s_uuid_hash); | 2317 | osb->uuid_hash = le32_to_cpu(di->id2.i_super.s_uuid_hash); |
2324 | mlog(0, "vol_label: %s\n", osb->vol_label); | 2318 | trace_ocfs2_initialize_super(osb->vol_label, osb->uuid_str, |
2325 | mlog(0, "uuid: %s\n", osb->uuid_str); | 2319 | (unsigned long long)osb->root_blkno, |
2326 | mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n", | 2320 | (unsigned long long)osb->system_dir_blkno, |
2327 | (unsigned long long)osb->root_blkno, | 2321 | osb->s_clustersize_bits); |
2328 | (unsigned long long)osb->system_dir_blkno); | ||
2329 | 2322 | ||
2330 | osb->osb_dlm_debug = ocfs2_new_dlm_debug(); | 2323 | osb->osb_dlm_debug = ocfs2_new_dlm_debug(); |
2331 | if (!osb->osb_dlm_debug) { | 2324 | if (!osb->osb_dlm_debug) { |
@@ -2500,8 +2493,6 @@ static int ocfs2_check_volume(struct ocfs2_super *osb) | |||
2500 | * ourselves as mounted. */ | 2493 | * ourselves as mounted. */ |
2501 | } | 2494 | } |
2502 | 2495 | ||
2503 | mlog(0, "Journal loaded.\n"); | ||
2504 | |||
2505 | status = ocfs2_load_local_alloc(osb); | 2496 | status = ocfs2_load_local_alloc(osb); |
2506 | if (status < 0) { | 2497 | if (status < 0) { |
2507 | mlog_errno(status); | 2498 | mlog_errno(status); |