[PATCH] iomap: Fix writepage tracepoint pgoff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

page_offset() confusingly returns the number of bytes from the
beginning of the file and not the pgoff, which the tracepoint claims
to be returning.  We're already returning the number of bytes from the
beginning of the file in the 'offset' parameter, so correct the pgoff
to be what was apparently intended.

Fixes: 0b1b213fcf3a ("xfs: event tracing support")
Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

diff --git a/fs/iomap/trace.h b/fs/iomap/trace.h
index d6ba705f938a..ebc89ec5e6c7 100644
--- a/fs/iomap/trace.h
+++ b/fs/iomap/trace.h
@@ -56,7 +56,7 @@ DECLARE_EVENT_CLASS(iomap_page_class,
 	TP_fast_assign(
 		__entry->dev = inode->i_sb->s_dev;
 		__entry->ino = inode->i_ino;
-		__entry->pgoff = page_offset(page);
+		__entry->pgoff = page->index;
 		__entry->size = i_size_read(inode);
 		__entry->offset = off;
 		__entry->length = len;




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux