View | Details | Raw Unified | Return to bug 941305
Collapse All | Expand All

(-)linux-3.16-openSUSE-13.2/fs/xfs/xfs_da_format.c (-2 / +2 lines)
Lines 256-262 xfs_dir2_data_get_ftype( Link Here
256
	return XFS_DIR3_FT_UNKNOWN;
256
	return XFS_DIR3_FT_UNKNOWN;
257
}
257
}
258
258
259
static void
259
void
260
xfs_dir2_data_put_ftype(
260
xfs_dir2_data_put_ftype(
261
	struct xfs_dir2_data_entry *dep,
261
	struct xfs_dir2_data_entry *dep,
262
	__uint8_t		ftype)
262
	__uint8_t		ftype)
Lines 276-282 xfs_dir3_data_get_ftype( Link Here
276
	return ftype;
276
	return ftype;
277
}
277
}
278
278
279
static void
279
void
280
xfs_dir3_data_put_ftype(
280
xfs_dir3_data_put_ftype(
281
	struct xfs_dir2_data_entry *dep,
281
	struct xfs_dir2_data_entry *dep,
282
	__uint8_t		type)
282
	__uint8_t		type)
(-)linux-3.16-openSUSE-13.2/fs/xfs/xfs_dir2_node.c (+7 lines)
Lines 2171-2176 xfs_dir2_node_replace( Link Here
2171
	 */
2171
	 */
2172
	if (rval == EEXIST) {
2172
	if (rval == EEXIST) {
2173
		struct xfs_dir2_leaf_entry *ents;
2173
		struct xfs_dir2_leaf_entry *ents;
2174
		xfs_ino_t oldinum;
2175
		int old_ftype, new_ftype;
2176
2174
		/*
2177
		/*
2175
		 * Find the leaf entry.
2178
		 * Find the leaf entry.
2176
		 */
2179
		 */
Lines 2194-2202 xfs_dir2_node_replace( Link Here
2194
		/*
2197
		/*
2195
		 * Fill in the new inode number and log the entry.
2198
		 * Fill in the new inode number and log the entry.
2196
		 */
2199
		 */
2200
		oldinum = be64_to_cpu(dep->inumber);
2201
		old_ftype = args->dp->d_ops->data_get_ftype(dep);
2197
		dep->inumber = cpu_to_be64(inum);
2202
		dep->inumber = cpu_to_be64(inum);
2198
		args->dp->d_ops->data_put_ftype(dep, args->filetype);
2203
		args->dp->d_ops->data_put_ftype(dep, args->filetype);
2199
		xfs_dir2_data_log_entry(args, state->extrablk.bp, dep);
2204
		xfs_dir2_data_log_entry(args, state->extrablk.bp, dep);
2205
		new_ftype = args->dp->d_ops->data_get_ftype(dep);
2206
		trace_xfs_dir2_node_replace_done(args, oldinum, inum, old_ftype, new_ftype);
2200
		rval = 0;
2207
		rval = 0;
2201
	}
2208
	}
2202
	/*
2209
	/*
(-)linux-3.16-openSUSE-13.2/fs/xfs/xfs_trace.c (+1 lines)
Lines 47-52 Link Here
47
#include "xfs_inode_item.h"
47
#include "xfs_inode_item.h"
48
#include "xfs_bmap_btree.h"
48
#include "xfs_bmap_btree.h"
49
#include "xfs_filestream.h"
49
#include "xfs_filestream.h"
50
#include "xfs_dir2.h"
50
51
51
/*
52
/*
52
 * We include this last to have the helpers above available for the trace
53
 * We include this last to have the helpers above available for the trace
(-)linux-3.16-openSUSE-13.2/fs/xfs/xfs_trace.h (-3 / +50 lines)
Lines 785-790 TRACE_EVENT(xfs_rename, Link Here
785
		__field(xfs_ino_t, target_dp_ino)
785
		__field(xfs_ino_t, target_dp_ino)
786
		__field(int, src_namelen)
786
		__field(int, src_namelen)
787
		__field(int, target_namelen)
787
		__field(int, target_namelen)
788
		__field(int, src_type)
789
		__field(int, target_type)
788
		__dynamic_array(char, src_name, src_name->len)
790
		__dynamic_array(char, src_name, src_name->len)
789
		__dynamic_array(char, target_name, target_name->len)
791
		__dynamic_array(char, target_name, target_name->len)
790
	),
792
	),
Lines 794-808 TRACE_EVENT(xfs_rename, Link Here
794
		__entry->target_dp_ino = target_dp->i_ino;
796
		__entry->target_dp_ino = target_dp->i_ino;
795
		__entry->src_namelen = src_name->len;
797
		__entry->src_namelen = src_name->len;
796
		__entry->target_namelen = target_name->len;
798
		__entry->target_namelen = target_name->len;
799
		__entry->src_type = src_name->type;
800
		__entry->target_type = target_name->type;
797
		memcpy(__get_str(src_name), src_name->name, src_name->len);
801
		memcpy(__get_str(src_name), src_name->name, src_name->len);
798
		memcpy(__get_str(target_name), target_name->name,
802
		memcpy(__get_str(target_name), target_name->name,
799
			target_name->len);
803
			target_name->len);
800
	),
804
	),
801
	TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
805
	TP_printk("dev %d:%d src dp ino 0x%llx target dp ino 0x%llx"
802
		  " src name %.*s target name %.*s",
806
		  " src type %d target type %d src name %.*s target name %.*s",
803
		  MAJOR(__entry->dev), MINOR(__entry->dev),
807
		  MAJOR(__entry->dev), MINOR(__entry->dev),
804
		  __entry->src_dp_ino,
808
		  __entry->src_dp_ino,
805
		  __entry->target_dp_ino,
809
		  __entry->target_dp_ino,
810
		  __entry->src_type,
811
		  __entry->target_type,
806
		  __entry->src_namelen,
812
		  __entry->src_namelen,
807
		  __get_str(src_name),
813
		  __get_str(src_name),
808
		  __entry->target_namelen,
814
		  __entry->target_namelen,
Lines 1616-1621 DEFINE_ALLOC_EVENT(xfs_alloc_vextent_noa Link Here
1616
DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
1622
DEFINE_ALLOC_EVENT(xfs_alloc_vextent_loopfailed);
1617
DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
1623
DEFINE_ALLOC_EVENT(xfs_alloc_vextent_allfailed);
1618
1624
1625
struct xfs_dir2_data_entry;
1626
1627
void
1628
xfs_dir3_data_put_ftype(
1629
	struct xfs_dir2_data_entry *dep,
1630
	__uint8_t		ftype);
1631
1619
DECLARE_EVENT_CLASS(xfs_da_class,
1632
DECLARE_EVENT_CLASS(xfs_da_class,
1620
	TP_PROTO(struct xfs_da_args *args),
1633
	TP_PROTO(struct xfs_da_args *args),
1621
	TP_ARGS(args),
1634
	TP_ARGS(args),
Lines 1627-1632 DECLARE_EVENT_CLASS(xfs_da_class, Link Here
1627
		__field(xfs_dahash_t, hashval)
1640
		__field(xfs_dahash_t, hashval)
1628
		__field(xfs_ino_t, inumber)
1641
		__field(xfs_ino_t, inumber)
1629
		__field(int, op_flags)
1642
		__field(int, op_flags)
1643
		__field(int, type)
1644
		__field(int, dir3_op)
1630
	),
1645
	),
1631
	TP_fast_assign(
1646
	TP_fast_assign(
1632
		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
1647
		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
Lines 1637-1645 DECLARE_EVENT_CLASS(xfs_da_class, Link Here
1637
		__entry->hashval = args->hashval;
1652
		__entry->hashval = args->hashval;
1638
		__entry->inumber = args->inumber;
1653
		__entry->inumber = args->inumber;
1639
		__entry->op_flags = args->op_flags;
1654
		__entry->op_flags = args->op_flags;
1655
		__entry->type = args->filetype;
1656
		__entry->dir3_op = (args->dp->d_ops->data_put_ftype == xfs_dir3_data_put_ftype);
1640
	),
1657
	),
1641
	TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
1658
	TP_printk("dev %d:%d ino 0x%llx name %.*s namelen %d hashval 0x%x "
1642
		  "inumber 0x%llx op_flags %s",
1659
		  "inumber 0x%llx op_flags %s ftype %d dir3_op %d",
1643
		  MAJOR(__entry->dev), MINOR(__entry->dev),
1660
		  MAJOR(__entry->dev), MINOR(__entry->dev),
1644
		  __entry->ino,
1661
		  __entry->ino,
1645
		  __entry->namelen,
1662
		  __entry->namelen,
Lines 1647-1653 DECLARE_EVENT_CLASS(xfs_da_class, Link Here
1647
		  __entry->namelen,
1664
		  __entry->namelen,
1648
		  __entry->hashval,
1665
		  __entry->hashval,
1649
		  __entry->inumber,
1666
		  __entry->inumber,
1650
		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS))
1667
		  __print_flags(__entry->op_flags, "|", XFS_DA_OP_FLAGS),
1668
		  __entry->type, __entry->dir3_op)
1651
)
1669
)
1652
1670
1653
#define DEFINE_DIR2_EVENT(name) \
1671
#define DEFINE_DIR2_EVENT(name) \
Lines 1680-1685 DEFINE_DIR2_EVENT(xfs_dir2_node_replace) Link Here
1680
DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
1698
DEFINE_DIR2_EVENT(xfs_dir2_node_removename);
1681
DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
1699
DEFINE_DIR2_EVENT(xfs_dir2_node_to_leaf);
1682
1700
1701
TRACE_EVENT(xfs_dir2_node_replace_done,
1702
	TP_PROTO(struct xfs_da_args *args, xfs_ino_t oldino, xfs_ino_t newino, int oldftype, int newftype),
1703
	TP_ARGS(args, oldino, newino, oldftype, newftype),
1704
	TP_STRUCT__entry(
1705
		__field(dev_t, dev)
1706
		__field(xfs_ino_t, ino)
1707
		__field(xfs_ino_t, oldino)
1708
		__field(xfs_ino_t, newino)
1709
		__field(int, oldftype)
1710
		__field(int, newftype)
1711
		__field(int, dir3_op)
1712
	),
1713
	TP_fast_assign(
1714
		__entry->dev = VFS_I(args->dp)->i_sb->s_dev;
1715
		__entry->ino = args->dp->i_ino;
1716
		__entry->oldino = oldino;
1717
		__entry->newino = newino;
1718
		__entry->oldftype = oldftype;
1719
		__entry->newftype = newftype;
1720
		__entry->dir3_op = (args->dp->d_ops->data_put_ftype == xfs_dir3_data_put_ftype);
1721
	),
1722
	TP_printk("dev %d:%d ino 0x%llx oldino 0x%llx newino 0x%llx "
1723
		  "oldftype %d newftype %d dir3_op %d",
1724
		  MAJOR(__entry->dev), MINOR(__entry->dev),
1725
		  __entry->ino,
1726
		  __entry->oldino, __entry->newino,
1727
		  __entry->oldftype, __entry->newftype, __entry->dir3_op)
1728
);
1729
1683
DECLARE_EVENT_CLASS(xfs_attr_class,
1730
DECLARE_EVENT_CLASS(xfs_attr_class,
1684
	TP_PROTO(struct xfs_da_args *args),
1731
	TP_PROTO(struct xfs_da_args *args),
1685
	TP_ARGS(args),
1732
	TP_ARGS(args),

Return to bug 941305