Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ocfs2: Remove masklog ML_XATTR.

Remove mlog(0) from fs/ocfs2/xattr.c and the masklog ML_XATTR.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>

Tao Ma 402b4183 32a42d39

+239 -80
-1
fs/ocfs2/cluster/masklog.c
··· 102 102 define_mask(CONN), 103 103 define_mask(QUORUM), 104 104 define_mask(EXPORT), 105 - define_mask(XATTR), 106 105 define_mask(QUOTA), 107 106 define_mask(BASTS), 108 107 define_mask(RESERVATIONS),
-1
fs/ocfs2/cluster/masklog.h
··· 104 104 #define ML_CONN 0x0000000004000000ULL /* net connection management */ 105 105 #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ 106 106 #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ 107 - #define ML_XATTR 0x0000000020000000ULL /* ocfs2 extended attributes */ 108 107 #define ML_QUOTA 0x0000000040000000ULL /* ocfs2 quota operations */ 109 108 #define ML_BASTS 0x0000000100000000ULL /* dlmglue asts and basts */ 110 109 #define ML_RESERVATIONS 0x0000000200000000ULL /* ocfs2 alloc reservations */
+164
fs/ocfs2/ocfs2_trace.h
··· 74 74 TP_PROTO(void *pointer), \ 75 75 TP_ARGS(pointer)) 76 76 77 + DECLARE_EVENT_CLASS(ocfs2__string, 78 + TP_PROTO(const char *name), 79 + TP_ARGS(name), 80 + TP_STRUCT__entry( 81 + __string(name,name) 82 + ), 83 + TP_fast_assign( 84 + __assign_str(name, name); 85 + ), 86 + TP_printk("%s", __get_str(name)) 87 + ); 88 + 89 + #define DEFINE_OCFS2_STRING_EVENT(name) \ 90 + DEFINE_EVENT(ocfs2__string, name, \ 91 + TP_PROTO(const char *name), \ 92 + TP_ARGS(name)) 93 + 77 94 DECLARE_EVENT_CLASS(ocfs2__int_int, 78 95 TP_PROTO(int value1, int value2), 79 96 TP_ARGS(value1, value2), ··· 333 316 TP_PROTO(unsigned long long ull, unsigned int value1, \ 334 317 unsigned int value2, unsigned int value3), \ 335 318 TP_ARGS(ull, value1, value2, value3)) 319 + 320 + DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint_uint, 321 + TP_PROTO(unsigned long long value1, unsigned long long value2, 322 + unsigned int value3, unsigned int value4), 323 + TP_ARGS(value1, value2, value3, value4), 324 + TP_STRUCT__entry( 325 + __field(unsigned long long, value1) 326 + __field(unsigned long long, value2) 327 + __field(unsigned int, value3) 328 + __field(unsigned int, value4) 329 + ), 330 + TP_fast_assign( 331 + __entry->value1 = value1; 332 + __entry->value2 = value2; 333 + __entry->value3 = value3; 334 + __entry->value4 = value4; 335 + ), 336 + TP_printk("%llu %llu %u %u", 337 + __entry->value1, __entry->value2, 338 + __entry->value3, __entry->value4) 339 + ); 340 + 341 + #define DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(name) \ 342 + DEFINE_EVENT(ocfs2__ull_ull_uint_uint, name, \ 343 + TP_PROTO(unsigned long long ull, unsigned long long ull1, \ 344 + unsigned int value2, unsigned int value3), \ 345 + TP_ARGS(ull, ull1, value2, value3)) 336 346 337 347 /* Trace events for fs/ocfs2/alloc.c. */ 338 348 DECLARE_EVENT_CLASS(ocfs2__btree_ops, ··· 1689 1645 ); 1690 1646 1691 1647 /* End of trace events for fs/ocfs2/super.c. */ 1648 + 1649 + /* Trace events for fs/ocfs2/xattr.c. */ 1650 + 1651 + DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_xattr_block); 1652 + 1653 + DEFINE_OCFS2_UINT_EVENT(ocfs2_xattr_extend_allocation); 1654 + 1655 + TRACE_EVENT(ocfs2_init_xattr_set_ctxt, 1656 + TP_PROTO(const char *name, int meta, int clusters, int credits), 1657 + TP_ARGS(name, meta, clusters, credits), 1658 + TP_STRUCT__entry( 1659 + __string(name, name) 1660 + __field(int, meta) 1661 + __field(int, clusters) 1662 + __field(int, credits) 1663 + ), 1664 + TP_fast_assign( 1665 + __assign_str(name, name); 1666 + __entry->meta = meta; 1667 + __entry->clusters = clusters; 1668 + __entry->credits = credits; 1669 + ), 1670 + TP_printk("%s %d %d %d", __get_str(name), __entry->meta, 1671 + __entry->clusters, __entry->credits) 1672 + ); 1673 + 1674 + DECLARE_EVENT_CLASS(ocfs2__xattr_find, 1675 + TP_PROTO(unsigned long long ino, const char *name, int name_index, 1676 + unsigned int hash, unsigned long long location, 1677 + int xe_index), 1678 + TP_ARGS(ino, name, name_index, hash, location, xe_index), 1679 + TP_STRUCT__entry( 1680 + __field(unsigned long long, ino) 1681 + __string(name, name) 1682 + __field(int, name_index) 1683 + __field(unsigned int, hash) 1684 + __field(unsigned long long, location) 1685 + __field(int, xe_index) 1686 + ), 1687 + TP_fast_assign( 1688 + __entry->ino = ino; 1689 + __assign_str(name, name); 1690 + __entry->name_index = name_index; 1691 + __entry->hash = hash; 1692 + __entry->location = location; 1693 + __entry->xe_index = xe_index; 1694 + ), 1695 + TP_printk("%llu %s %d %u %llu %d", __entry->ino, __get_str(name), 1696 + __entry->name_index, __entry->hash, __entry->location, 1697 + __entry->xe_index) 1698 + ); 1699 + 1700 + #define DEFINE_OCFS2_XATTR_FIND_EVENT(name) \ 1701 + DEFINE_EVENT(ocfs2__xattr_find, name, \ 1702 + TP_PROTO(unsigned long long ino, const char *name, int name_index, \ 1703 + unsigned int hash, unsigned long long bucket, \ 1704 + int xe_index), \ 1705 + TP_ARGS(ino, name, name_index, hash, bucket, xe_index)) 1706 + 1707 + DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_bucket_find); 1708 + 1709 + DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find); 1710 + 1711 + DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find_rec); 1712 + 1713 + DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_iterate_xattr_buckets); 1714 + 1715 + DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_iterate_xattr_bucket); 1716 + 1717 + DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cp_xattr_block_to_bucket_begin); 1718 + 1719 + DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cp_xattr_block_to_bucket_end); 1720 + 1721 + DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block_begin); 1722 + 1723 + DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block); 1724 + 1725 + DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_defrag_xattr_bucket); 1726 + 1727 + DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_bucket_cross_cluster); 1728 + 1729 + DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_divide_xattr_bucket_begin); 1730 + 1731 + DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_divide_xattr_bucket_move); 1732 + 1733 + DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_cp_xattr_bucket); 1734 + 1735 + DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_buckets); 1736 + 1737 + DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_adjust_xattr_cross_cluster); 1738 + 1739 + DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_begin); 1740 + 1741 + DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_add_new_xattr_cluster); 1742 + 1743 + DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_insert); 1744 + 1745 + DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_extend_xattr_bucket); 1746 + 1747 + DEFINE_OCFS2_ULL_EVENT(ocfs2_add_new_xattr_bucket); 1748 + 1749 + DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_xattr_bucket_value_truncate); 1750 + 1751 + DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_rm_xattr_cluster); 1752 + 1753 + DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_header); 1754 + 1755 + DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_create_empty_xattr_block); 1756 + 1757 + DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_bucket); 1758 + 1759 + DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_index_block); 1760 + 1761 + DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_xattr_bucket_value_refcount); 1762 + 1763 + DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_reflink_xattr_buckets); 1764 + 1765 + DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_rec); 1766 + 1767 + /* End of trace events for fs/ocfs2/xattr.c. */ 1692 1768 #endif /* _TRACE_OCFS2_H */ 1693 1769 1694 1770 /* This part must be outside protection */
+75 -78
fs/ocfs2/xattr.c
··· 37 37 #include <linux/string.h> 38 38 #include <linux/security.h> 39 39 40 - #define MLOG_MASK_PREFIX ML_XATTR 41 40 #include <cluster/masklog.h> 42 41 43 42 #include "ocfs2.h" ··· 56 57 #include "xattr.h" 57 58 #include "refcounttree.h" 58 59 #include "acl.h" 60 + #include "ocfs2_trace.h" 59 61 60 62 struct ocfs2_xattr_def_value_root { 61 63 struct ocfs2_xattr_value_root xv; ··· 474 474 struct ocfs2_xattr_block *xb = 475 475 (struct ocfs2_xattr_block *)bh->b_data; 476 476 477 - mlog(0, "Validating xattr block %llu\n", 478 - (unsigned long long)bh->b_blocknr); 477 + trace_ocfs2_validate_xattr_block((unsigned long long)bh->b_blocknr); 479 478 480 479 BUG_ON(!buffer_uptodate(bh)); 481 480 ··· 714 715 u32 prev_clusters, logical_start = le32_to_cpu(vb->vb_xv->xr_clusters); 715 716 struct ocfs2_extent_tree et; 716 717 717 - mlog(0, "(clusters_to_add for xattr= %u)\n", clusters_to_add); 718 - 719 718 ocfs2_init_xattr_value_extent_tree(&et, INODE_CACHE(inode), vb); 720 719 721 720 while (clusters_to_add) { 721 + trace_ocfs2_xattr_extend_allocation(clusters_to_add); 722 + 722 723 status = vb->vb_access(handle, INODE_CACHE(inode), vb->vb_bh, 723 724 OCFS2_JOURNAL_ACCESS_WRITE); 724 725 if (status < 0) { ··· 753 754 */ 754 755 BUG_ON(why == RESTART_META); 755 756 756 - mlog(0, "restarting xattr value extension for %u" 757 - " clusters,.\n", clusters_to_add); 758 757 credits = ocfs2_calc_extend_credits(inode->i_sb, 759 758 &vb->vb_xv->xr_list, 760 759 clusters_to_add); ··· 3243 3246 } 3244 3247 3245 3248 meta_add += extra_meta; 3246 - mlog(0, "Set xattr %s, reserve meta blocks = %d, clusters = %d, " 3247 - "credits = %d\n", xi->xi_name, meta_add, clusters_add, *credits); 3249 + trace_ocfs2_init_xattr_set_ctxt(xi->xi_name, meta_add, 3250 + clusters_add, *credits); 3248 3251 3249 3252 if (meta_add) { 3250 3253 ret = ocfs2_reserve_new_metadata_blocks(osb, meta_add, ··· 3884 3887 3885 3888 if (found) { 3886 3889 xs->here = &xs->header->xh_entries[index]; 3887 - mlog(0, "find xattr %s in bucket %llu, entry = %u\n", name, 3888 - (unsigned long long)bucket_blkno(xs->bucket), index); 3890 + trace_ocfs2_xattr_bucket_find(OCFS2_I(inode)->ip_blkno, 3891 + name, name_index, name_hash, 3892 + (unsigned long long)bucket_blkno(xs->bucket), 3893 + index); 3889 3894 } else 3890 3895 ret = -ENODATA; 3891 3896 ··· 3914 3915 if (le16_to_cpu(el->l_next_free_rec) == 0) 3915 3916 return -ENODATA; 3916 3917 3917 - mlog(0, "find xattr %s, hash = %u, index = %d in xattr tree\n", 3918 - name, name_hash, name_index); 3918 + trace_ocfs2_xattr_index_block_find(OCFS2_I(inode)->ip_blkno, 3919 + name, name_index, name_hash, 3920 + (unsigned long long)root_bh->b_blocknr, 3921 + -1); 3919 3922 3920 3923 ret = ocfs2_xattr_get_rec(inode, name_hash, &p_blkno, &first_hash, 3921 3924 &num_clusters, el); ··· 3928 3927 3929 3928 BUG_ON(p_blkno == 0 || num_clusters == 0 || first_hash > name_hash); 3930 3929 3931 - mlog(0, "find xattr extent rec %u clusters from %llu, the first hash " 3932 - "in the rec is %u\n", num_clusters, (unsigned long long)p_blkno, 3933 - first_hash); 3930 + trace_ocfs2_xattr_index_block_find_rec(OCFS2_I(inode)->ip_blkno, 3931 + name, name_index, first_hash, 3932 + (unsigned long long)p_blkno, 3933 + num_clusters); 3934 3934 3935 3935 ret = ocfs2_xattr_bucket_find(inode, name_index, name, name_hash, 3936 3936 p_blkno, first_hash, num_clusters, xs); ··· 3957 3955 return -ENOMEM; 3958 3956 } 3959 3957 3960 - mlog(0, "iterating xattr buckets in %u clusters starting from %llu\n", 3961 - clusters, (unsigned long long)blkno); 3958 + trace_ocfs2_iterate_xattr_buckets( 3959 + (unsigned long long)OCFS2_I(inode)->ip_blkno, 3960 + (unsigned long long)blkno, clusters); 3962 3961 3963 3962 for (i = 0; i < num_buckets; i++, blkno += bucket->bu_blocks) { 3964 3963 ret = ocfs2_read_xattr_bucket(bucket, blkno); ··· 3975 3972 if (i == 0) 3976 3973 num_buckets = le16_to_cpu(bucket_xh(bucket)->xh_num_buckets); 3977 3974 3978 - mlog(0, "iterating xattr bucket %llu, first hash %u\n", 3979 - (unsigned long long)blkno, 3975 + trace_ocfs2_iterate_xattr_bucket((unsigned long long)blkno, 3980 3976 le32_to_cpu(bucket_xh(bucket)->xh_entries[0].xe_name_hash)); 3981 3977 if (func) { 3982 3978 ret = func(inode, bucket, para); ··· 4175 4173 char *src = xb_bh->b_data; 4176 4174 char *target = bucket_block(bucket, blks - 1); 4177 4175 4178 - mlog(0, "cp xattr from block %llu to bucket %llu\n", 4179 - (unsigned long long)xb_bh->b_blocknr, 4180 - (unsigned long long)bucket_blkno(bucket)); 4176 + trace_ocfs2_cp_xattr_block_to_bucket_begin( 4177 + (unsigned long long)xb_bh->b_blocknr, 4178 + (unsigned long long)bucket_blkno(bucket)); 4181 4179 4182 4180 for (i = 0; i < blks; i++) 4183 4181 memset(bucket_block(bucket, i), 0, blocksize); ··· 4213 4211 for (i = 0; i < count; i++) 4214 4212 le16_add_cpu(&xh->xh_entries[i].xe_name_offset, off_change); 4215 4213 4216 - mlog(0, "copy entry: start = %u, size = %u, offset_change = %u\n", 4217 - offset, size, off_change); 4214 + trace_ocfs2_cp_xattr_block_to_bucket_end(offset, size, off_change); 4218 4215 4219 4216 sort(target + offset, count, sizeof(struct ocfs2_xattr_entry), 4220 4217 cmp_xe, swap_xe); ··· 4262 4261 struct ocfs2_xattr_tree_root *xr; 4263 4262 u16 xb_flags = le16_to_cpu(xb->xb_flags); 4264 4263 4265 - mlog(0, "create xattr index block for %llu\n", 4266 - (unsigned long long)xb_bh->b_blocknr); 4264 + trace_ocfs2_xattr_create_index_block_begin( 4265 + (unsigned long long)xb_bh->b_blocknr); 4267 4266 4268 4267 BUG_ON(xb_flags & OCFS2_XATTR_INDEXED); 4269 4268 BUG_ON(!xs->bucket); ··· 4296 4295 */ 4297 4296 blkno = ocfs2_clusters_to_blocks(inode->i_sb, bit_off); 4298 4297 4299 - mlog(0, "allocate 1 cluster from %llu to xattr block\n", 4300 - (unsigned long long)blkno); 4298 + trace_ocfs2_xattr_create_index_block((unsigned long long)blkno); 4301 4299 4302 4300 ret = ocfs2_init_xattr_bucket(xs->bucket, blkno); 4303 4301 if (ret) { ··· 4400 4400 entries = (char *)xh->xh_entries; 4401 4401 xh_free_start = le16_to_cpu(xh->xh_free_start); 4402 4402 4403 - mlog(0, "adjust xattr bucket in %llu, count = %u, " 4404 - "xh_free_start = %u, xh_name_value_len = %u.\n", 4403 + trace_ocfs2_defrag_xattr_bucket( 4405 4404 (unsigned long long)blkno, le16_to_cpu(xh->xh_count), 4406 4405 xh_free_start, le16_to_cpu(xh->xh_name_value_len)); 4407 4406 ··· 4502 4503 BUG_ON(le16_to_cpu(bucket_xh(first)->xh_num_buckets) < num_buckets); 4503 4504 BUG_ON(OCFS2_XATTR_BUCKET_SIZE == OCFS2_SB(sb)->s_clustersize); 4504 4505 4505 - mlog(0, "move half of xattrs in cluster %llu to %llu\n", 4506 - (unsigned long long)last_cluster_blkno, (unsigned long long)new_blkno); 4506 + trace_ocfs2_mv_xattr_bucket_cross_cluster( 4507 + (unsigned long long)last_cluster_blkno, 4508 + (unsigned long long)new_blkno); 4507 4509 4508 4510 ret = ocfs2_mv_xattr_buckets(inode, handle, bucket_blkno(first), 4509 4511 last_cluster_blkno, new_blkno, ··· 4614 4614 struct ocfs2_xattr_entry *xe; 4615 4615 int blocksize = inode->i_sb->s_blocksize; 4616 4616 4617 - mlog(0, "move some of xattrs from bucket %llu to %llu\n", 4618 - (unsigned long long)blk, (unsigned long long)new_blk); 4617 + trace_ocfs2_divide_xattr_bucket_begin((unsigned long long)blk, 4618 + (unsigned long long)new_blk); 4619 4619 4620 4620 s_bucket = ocfs2_xattr_bucket_new(inode); 4621 4621 t_bucket = ocfs2_xattr_bucket_new(inode); ··· 4714 4714 */ 4715 4715 xe = &xh->xh_entries[start]; 4716 4716 len = sizeof(struct ocfs2_xattr_entry) * (count - start); 4717 - mlog(0, "mv xattr entry len %d from %d to %d\n", len, 4718 - (int)((char *)xe - (char *)xh), 4719 - (int)((char *)xh->xh_entries - (char *)xh)); 4717 + trace_ocfs2_divide_xattr_bucket_move(len, 4718 + (int)((char *)xe - (char *)xh), 4719 + (int)((char *)xh->xh_entries - (char *)xh)); 4720 4720 memmove((char *)xh->xh_entries, (char *)xe, len); 4721 4721 xe = &xh->xh_entries[count - start]; 4722 4722 len = sizeof(struct ocfs2_xattr_entry) * start; ··· 4788 4788 4789 4789 BUG_ON(s_blkno == t_blkno); 4790 4790 4791 - mlog(0, "cp bucket %llu to %llu, target is %d\n", 4792 - (unsigned long long)s_blkno, (unsigned long long)t_blkno, 4793 - t_is_new); 4791 + trace_ocfs2_cp_xattr_bucket((unsigned long long)s_blkno, 4792 + (unsigned long long)t_blkno, 4793 + t_is_new); 4794 4794 4795 4795 s_bucket = ocfs2_xattr_bucket_new(inode); 4796 4796 t_bucket = ocfs2_xattr_bucket_new(inode); ··· 4862 4862 int num_buckets = ocfs2_xattr_buckets_per_cluster(osb); 4863 4863 struct ocfs2_xattr_bucket *old_first, *new_first; 4864 4864 4865 - mlog(0, "mv xattrs from cluster %llu to %llu\n", 4866 - (unsigned long long)last_blk, (unsigned long long)to_blk); 4865 + trace_ocfs2_mv_xattr_buckets((unsigned long long)last_blk, 4866 + (unsigned long long)to_blk); 4867 4867 4868 4868 BUG_ON(start_bucket >= num_buckets); 4869 4869 if (start_bucket) { ··· 5013 5013 { 5014 5014 int ret; 5015 5015 5016 - mlog(0, "adjust xattrs from cluster %llu len %u to %llu\n", 5017 - (unsigned long long)bucket_blkno(first), prev_clusters, 5018 - (unsigned long long)new_blk); 5016 + trace_ocfs2_adjust_xattr_cross_cluster( 5017 + (unsigned long long)bucket_blkno(first), 5018 + (unsigned long long)new_blk, prev_clusters); 5019 5019 5020 5020 if (ocfs2_xattr_buckets_per_cluster(OCFS2_SB(inode->i_sb)) > 1) { 5021 5021 ret = ocfs2_mv_xattr_bucket_cross_cluster(inode, ··· 5088 5088 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 5089 5089 struct ocfs2_extent_tree et; 5090 5090 5091 - mlog(0, "Add new xattr cluster for %llu, previous xattr hash = %u, " 5092 - "previous xattr blkno = %llu\n", 5093 - (unsigned long long)OCFS2_I(inode)->ip_blkno, 5094 - prev_cpos, (unsigned long long)bucket_blkno(first)); 5091 + trace_ocfs2_add_new_xattr_cluster_begin( 5092 + (unsigned long long)OCFS2_I(inode)->ip_blkno, 5093 + (unsigned long long)bucket_blkno(first), 5094 + prev_cpos, prev_clusters); 5095 5095 5096 5096 ocfs2_init_xattr_tree_extent_tree(&et, INODE_CACHE(inode), root_bh); 5097 5097 ··· 5113 5113 BUG_ON(num_bits > clusters_to_add); 5114 5114 5115 5115 block = ocfs2_clusters_to_blocks(osb->sb, bit_off); 5116 - mlog(0, "Allocating %u clusters at block %u for xattr in inode %llu\n", 5117 - num_bits, bit_off, (unsigned long long)OCFS2_I(inode)->ip_blkno); 5116 + trace_ocfs2_add_new_xattr_cluster((unsigned long long)block, num_bits); 5118 5117 5119 5118 if (bucket_blkno(first) + (prev_clusters * bpc) == block && 5120 5119 (prev_clusters + num_bits) << osb->s_clustersize_bits <= ··· 5129 5130 */ 5130 5131 v_start = prev_cpos + prev_clusters; 5131 5132 *num_clusters = prev_clusters + num_bits; 5132 - mlog(0, "Add contiguous %u clusters to previous extent rec.\n", 5133 - num_bits); 5134 5133 } else { 5135 5134 ret = ocfs2_adjust_xattr_cross_cluster(inode, 5136 5135 handle, ··· 5144 5147 } 5145 5148 } 5146 5149 5147 - mlog(0, "Insert %u clusters at block %llu for xattr at %u\n", 5148 - num_bits, (unsigned long long)block, v_start); 5150 + trace_ocfs2_add_new_xattr_cluster_insert((unsigned long long)block, 5151 + v_start, num_bits); 5149 5152 ret = ocfs2_insert_extent(handle, &et, v_start, block, 5150 5153 num_bits, 0, ctxt->meta_ac); 5151 5154 if (ret < 0) { ··· 5180 5183 u64 end_blk; 5181 5184 u16 new_bucket = le16_to_cpu(bucket_xh(first)->xh_num_buckets); 5182 5185 5183 - mlog(0, "extend xattr bucket in %llu, xattr extend rec starting " 5184 - "from %llu, len = %u\n", (unsigned long long)target_blk, 5185 - (unsigned long long)bucket_blkno(first), num_clusters); 5186 + trace_ocfs2_extend_xattr_bucket((unsigned long long)target_blk, 5187 + (unsigned long long)bucket_blkno(first), 5188 + num_clusters, new_bucket); 5186 5189 5187 5190 /* The extent must have room for an additional bucket */ 5188 5191 BUG_ON(new_bucket >= ··· 5262 5265 /* The bucket at the front of the extent */ 5263 5266 struct ocfs2_xattr_bucket *first; 5264 5267 5265 - mlog(0, "Add new xattr bucket starting from %llu\n", 5266 - (unsigned long long)bucket_blkno(target)); 5268 + trace_ocfs2_add_new_xattr_bucket( 5269 + (unsigned long long)bucket_blkno(target)); 5267 5270 5268 5271 /* The first bucket of the original extent */ 5269 5272 first = ocfs2_xattr_bucket_new(inode); ··· 5379 5382 * modified something. We have to assume they did, and dirty 5380 5383 * the whole bucket. This leaves us in a consistent state. 5381 5384 */ 5382 - mlog(0, "truncate %u in xattr bucket %llu to %d bytes.\n", 5383 - xe_off, (unsigned long long)bucket_blkno(bucket), len); 5385 + trace_ocfs2_xattr_bucket_value_truncate( 5386 + (unsigned long long)bucket_blkno(bucket), xe_off, len); 5384 5387 ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt); 5385 5388 if (ret) { 5386 5389 mlog_errno(ret); ··· 5430 5433 5431 5434 ocfs2_init_dealloc_ctxt(&dealloc); 5432 5435 5433 - mlog(0, "rm xattr extent rec at %u len = %u, start from %llu\n", 5434 - cpos, len, (unsigned long long)blkno); 5436 + trace_ocfs2_rm_xattr_cluster( 5437 + (unsigned long long)OCFS2_I(inode)->ip_blkno, 5438 + (unsigned long long)blkno, cpos, len); 5435 5439 5436 5440 ocfs2_remove_xattr_clusters_from_cache(INODE_CACHE(inode), blkno, 5437 5441 len); ··· 5536 5538 int ret; 5537 5539 struct ocfs2_xa_loc loc; 5538 5540 5539 - mlog(0, "Set xattr %s in xattr bucket\n", xi->xi_name); 5541 + trace_ocfs2_xattr_set_entry_bucket(xi->xi_name); 5540 5542 5541 5543 ocfs2_init_xattr_bucket_xa_loc(&loc, xs->bucket, 5542 5544 xs->not_found ? NULL : xs->here); ··· 5578 5580 { 5579 5581 int ret; 5580 5582 5581 - mlog(0, "Set xattr %s in xattr index block\n", xi->xi_name); 5583 + trace_ocfs2_xattr_set_entry_index_block(xi->xi_name); 5582 5584 5583 5585 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); 5584 5586 if (!ret) ··· 6037 6039 if (ocfs2_meta_ecc(OCFS2_SB(inode->i_sb))) 6038 6040 p = &refcount; 6039 6041 6040 - mlog(0, "refcount bucket %llu, count = %u\n", 6041 - (unsigned long long)bucket_blkno(bucket), 6042 - le16_to_cpu(xh->xh_count)); 6042 + trace_ocfs2_xattr_bucket_value_refcount( 6043 + (unsigned long long)bucket_blkno(bucket), 6044 + le16_to_cpu(xh->xh_count)); 6043 6045 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { 6044 6046 xe = &xh->xh_entries[i]; 6045 6047 ··· 6335 6337 u32 clusters, cpos, p_cluster, num_clusters; 6336 6338 unsigned int ext_flags = 0; 6337 6339 6338 - mlog(0, "reflink xattr in container %llu, count = %u\n", 6339 - (unsigned long long)old_bh->b_blocknr, le16_to_cpu(xh->xh_count)); 6340 + trace_ocfs2_reflink_xattr_header((unsigned long long)old_bh->b_blocknr, 6341 + le16_to_cpu(xh->xh_count)); 6340 6342 6341 6343 last = &new_xh->xh_entries[le16_to_cpu(new_xh->xh_count)]; 6342 6344 for (i = 0, j = 0; i < le16_to_cpu(xh->xh_count); i++, j++) { ··· 6536 6538 goto out; 6537 6539 } 6538 6540 6539 - mlog(0, "create new xattr block for inode %llu, index = %d\n", 6540 - (unsigned long long)fe_bh->b_blocknr, indexed); 6541 + trace_ocfs2_create_empty_xattr_block( 6542 + (unsigned long long)fe_bh->b_blocknr, indexed); 6541 6543 ret = ocfs2_create_xattr_block(inode, fe_bh, &ctxt, indexed, 6542 6544 ret_bh); 6543 6545 if (ret) ··· 6948 6950 if (ret) 6949 6951 mlog_errno(ret); 6950 6952 6951 - mlog(0, "insert new xattr extent rec start %llu len %u to %u\n", 6952 - (unsigned long long)new_blkno, num_clusters, reflink_cpos); 6953 + trace_ocfs2_reflink_xattr_buckets((unsigned long long)new_blkno, 6954 + num_clusters, reflink_cpos); 6953 6955 6954 6956 len -= num_clusters; 6955 6957 blkno += ocfs2_clusters_to_blocks(inode->i_sb, num_clusters); ··· 6978 6980 struct ocfs2_alloc_context *data_ac = NULL; 6979 6981 struct ocfs2_extent_tree et; 6980 6982 6981 - mlog(0, "reflink xattr buckets %llu len %u\n", 6982 - (unsigned long long)blkno, len); 6983 + trace_ocfs2_reflink_xattr_rec((unsigned long long)blkno, len); 6983 6984 6984 6985 ocfs2_init_xattr_tree_extent_tree(&et, 6985 6986 INODE_CACHE(args->reflink->new_inode),