diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-12-10 03:42:20 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-12-16 17:05:51 -0500 |
commit | a206c817c864583c44e2f418db8e6c7a000fbc38 (patch) | |
tree | 71c7327482299de93b4183c23d118939e8bd30fc /fs/xfs/linux-2.6/xfs_trace.h | |
parent | 405f80429436d38ab4e6b4c0d99861a1f00648fd (diff) |
xfs: kill xfs_iomap
Opencode the xfs_iomap code in it's two callers. The overlap of
passed flags already was minimal and will be further reduced in the
next patch.
As a side effect the BMAPI_* flags for xfs_bmapi and the IO_* flags
for I/O end processing are merged into a single set of flags, which
should be a bit more descriptive of the operation we perform.
Also improve the tracing by giving each caller it's own type set of
tracepoints.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_trace.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index acef2e98c594..f56431c916a0 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
@@ -935,10 +935,10 @@ DEFINE_PAGE_EVENT(xfs_writepage); | |||
935 | DEFINE_PAGE_EVENT(xfs_releasepage); | 935 | DEFINE_PAGE_EVENT(xfs_releasepage); |
936 | DEFINE_PAGE_EVENT(xfs_invalidatepage); | 936 | DEFINE_PAGE_EVENT(xfs_invalidatepage); |
937 | 937 | ||
938 | DECLARE_EVENT_CLASS(xfs_iomap_class, | 938 | DECLARE_EVENT_CLASS(xfs_imap_class, |
939 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, | 939 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, |
940 | int flags, struct xfs_bmbt_irec *irec), | 940 | int type, struct xfs_bmbt_irec *irec), |
941 | TP_ARGS(ip, offset, count, flags, irec), | 941 | TP_ARGS(ip, offset, count, type, irec), |
942 | TP_STRUCT__entry( | 942 | TP_STRUCT__entry( |
943 | __field(dev_t, dev) | 943 | __field(dev_t, dev) |
944 | __field(xfs_ino_t, ino) | 944 | __field(xfs_ino_t, ino) |
@@ -946,7 +946,7 @@ DECLARE_EVENT_CLASS(xfs_iomap_class, | |||
946 | __field(loff_t, new_size) | 946 | __field(loff_t, new_size) |
947 | __field(loff_t, offset) | 947 | __field(loff_t, offset) |
948 | __field(size_t, count) | 948 | __field(size_t, count) |
949 | __field(int, flags) | 949 | __field(int, type) |
950 | __field(xfs_fileoff_t, startoff) | 950 | __field(xfs_fileoff_t, startoff) |
951 | __field(xfs_fsblock_t, startblock) | 951 | __field(xfs_fsblock_t, startblock) |
952 | __field(xfs_filblks_t, blockcount) | 952 | __field(xfs_filblks_t, blockcount) |
@@ -958,13 +958,13 @@ DECLARE_EVENT_CLASS(xfs_iomap_class, | |||
958 | __entry->new_size = ip->i_new_size; | 958 | __entry->new_size = ip->i_new_size; |
959 | __entry->offset = offset; | 959 | __entry->offset = offset; |
960 | __entry->count = count; | 960 | __entry->count = count; |
961 | __entry->flags = flags; | 961 | __entry->type = type; |
962 | __entry->startoff = irec ? irec->br_startoff : 0; | 962 | __entry->startoff = irec ? irec->br_startoff : 0; |
963 | __entry->startblock = irec ? irec->br_startblock : 0; | 963 | __entry->startblock = irec ? irec->br_startblock : 0; |
964 | __entry->blockcount = irec ? irec->br_blockcount : 0; | 964 | __entry->blockcount = irec ? irec->br_blockcount : 0; |
965 | ), | 965 | ), |
966 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " | 966 | TP_printk("dev %d:%d ino 0x%llx size 0x%llx new_size 0x%llx " |
967 | "offset 0x%llx count %zd flags %s " | 967 | "offset 0x%llx count %zd type %s " |
968 | "startoff 0x%llx startblock %lld blockcount 0x%llx", | 968 | "startoff 0x%llx startblock %lld blockcount 0x%llx", |
969 | MAJOR(__entry->dev), MINOR(__entry->dev), | 969 | MAJOR(__entry->dev), MINOR(__entry->dev), |
970 | __entry->ino, | 970 | __entry->ino, |
@@ -972,20 +972,21 @@ DECLARE_EVENT_CLASS(xfs_iomap_class, | |||
972 | __entry->new_size, | 972 | __entry->new_size, |
973 | __entry->offset, | 973 | __entry->offset, |
974 | __entry->count, | 974 | __entry->count, |
975 | __print_flags(__entry->flags, "|", BMAPI_FLAGS), | 975 | __print_symbolic(__entry->type, XFS_IO_TYPES), |
976 | __entry->startoff, | 976 | __entry->startoff, |
977 | (__int64_t)__entry->startblock, | 977 | (__int64_t)__entry->startblock, |
978 | __entry->blockcount) | 978 | __entry->blockcount) |
979 | ) | 979 | ) |
980 | 980 | ||
981 | #define DEFINE_IOMAP_EVENT(name) \ | 981 | #define DEFINE_IOMAP_EVENT(name) \ |
982 | DEFINE_EVENT(xfs_iomap_class, name, \ | 982 | DEFINE_EVENT(xfs_imap_class, name, \ |
983 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ | 983 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, \ |
984 | int flags, struct xfs_bmbt_irec *irec), \ | 984 | int type, struct xfs_bmbt_irec *irec), \ |
985 | TP_ARGS(ip, offset, count, flags, irec)) | 985 | TP_ARGS(ip, offset, count, type, irec)) |
986 | DEFINE_IOMAP_EVENT(xfs_iomap_enter); | 986 | DEFINE_IOMAP_EVENT(xfs_map_blocks_found); |
987 | DEFINE_IOMAP_EVENT(xfs_iomap_found); | 987 | DEFINE_IOMAP_EVENT(xfs_map_blocks_alloc); |
988 | DEFINE_IOMAP_EVENT(xfs_iomap_alloc); | 988 | DEFINE_IOMAP_EVENT(xfs_get_blocks_found); |
989 | DEFINE_IOMAP_EVENT(xfs_get_blocks_alloc); | ||
989 | 990 | ||
990 | DECLARE_EVENT_CLASS(xfs_simple_io_class, | 991 | DECLARE_EVENT_CLASS(xfs_simple_io_class, |
991 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), | 992 | TP_PROTO(struct xfs_inode *ip, xfs_off_t offset, ssize_t count), |
@@ -1022,6 +1023,7 @@ DEFINE_EVENT(xfs_simple_io_class, name, \ | |||
1022 | TP_ARGS(ip, offset, count)) | 1023 | TP_ARGS(ip, offset, count)) |
1023 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); | 1024 | DEFINE_SIMPLE_IO_EVENT(xfs_delalloc_enospc); |
1024 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); | 1025 | DEFINE_SIMPLE_IO_EVENT(xfs_unwritten_convert); |
1026 | DEFINE_SIMPLE_IO_EVENT(xfs_get_blocks_notfound); | ||
1025 | 1027 | ||
1026 | 1028 | ||
1027 | TRACE_EVENT(xfs_itruncate_start, | 1029 | TRACE_EVENT(xfs_itruncate_start, |