aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_trace.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
index 75eb54af4d58..afb028213dbd 100644
--- a/fs/xfs/xfs_trace.h
+++ b/fs/xfs/xfs_trace.h
@@ -627,16 +627,19 @@ DECLARE_EVENT_CLASS(xfs_namespace_class,
627 TP_STRUCT__entry( 627 TP_STRUCT__entry(
628 __field(dev_t, dev) 628 __field(dev_t, dev)
629 __field(xfs_ino_t, dp_ino) 629 __field(xfs_ino_t, dp_ino)
630 __field(int, namelen)
630 __dynamic_array(char, name, name->len) 631 __dynamic_array(char, name, name->len)
631 ), 632 ),
632 TP_fast_assign( 633 TP_fast_assign(
633 __entry->dev = VFS_I(dp)->i_sb->s_dev; 634 __entry->dev = VFS_I(dp)->i_sb->s_dev;
634 __entry->dp_ino = dp->i_ino; 635 __entry->dp_ino = dp->i_ino;
636 __entry->namelen = name->len;
635 memcpy(__get_str(name), name->name, name->len); 637 memcpy(__get_str(name), name->name, name->len);
636 ), 638 ),
637 TP_printk("dev %d:%d dp ino 0x%llx name %s", 639 TP_printk("dev %d:%d dp ino 0x%llx name %.*s",
638 MAJOR(__entry->dev), MINOR(__entry->dev), 640 MAJOR(__entry->dev), MINOR(__entry->dev),
639 __entry->dp_ino, 641 __entry->dp_ino,
642 __entry->namelen,
640 __get_str(name)) 643 __get_str(name))
641) 644)
642 645
@@ -658,6 +661,8 @@ TRACE_EVENT(xfs_rename,
658 __field(dev_t, dev) 661 __field(dev_t, dev)
659 __field(xfs_ino_t, src_dp_ino) 662 __field(xfs_ino_t, src_dp_ino)
660 __field(xfs_ino_t, target_dp_ino) 663 __field(xfs_ino_t, target_dp_ino)
664 __field(int, src_namelen)
665 __field(int, target_namelen)
661 __dynamic_array(char, src_name, src_name->len) 666 __dynamic_array(char, src_name, src_name->len)
662 __dynamic_array(char, target_name, target_name->len) 667 __dynamic_array(char, target_name, target_name->len)
663 ), 668 ),
@@ -665,15 +670,20 @@ TRACE_EVENT(xfs_rename,
665 __entry->dev = VFS_I(src_dp)->i_sb->s_dev; 670 __entry->dev = VFS_I(src_dp)->i_sb->s_dev;
666 __entry->src_dp_ino = src_dp->i_ino; 671 __entry->src_dp_ino = src_dp->i_ino;
667 __entry->target_dp_ino = target_dp->i_ino; 672 __entry->target_dp_ino = target_dp->i_ino;
673 __entry->src_namelen = src_name->len;
674 __entry->target_namelen = target_name->len;
668 memcpy(__get_str(src_name), src_name->name, src_name->len); 675 memcpy(__get_str(src_name), src_name->name, src_name->len);
669 memcpy(__get_str(target_name), target_name->name, target_name->len); 676 memcpy(__get_str(target_name), target_name->name,
677 target_name->len);
670 ), 678 ),
671 TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx" 679 TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
672 " src name %s target name %s", 680 " src name %.*s target name %.*s",
673 MAJOR(__entry->dev), MINOR(__entry->dev), 681 MAJOR(__entry->dev), MINOR(__entry->dev),
674 __entry->src_dp_ino, 682 __entry->src_dp_ino,
675 __entry->target_dp_ino, 683 __entry->target_dp_ino,
684 __entry->src_namelen,
676 __get_str(src_name), 685 __get_str(src_name),
686 __entry->target_namelen,
677 __get_str(target_name)) 687 __get_str(target_name))
678) 688)
679 689