summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfstrace.h10
-rw-r--r--fs/nfs/read.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index 76f04aa3367c..21dac847f1e4 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -889,16 +889,18 @@ TRACE_EVENT(nfs_aop_readpage_done,
TRACE_EVENT(nfs_aop_readahead,
TP_PROTO(
const struct inode *inode,
+ struct page *page,
unsigned int nr_pages
),
- TP_ARGS(inode, nr_pages),
+ TP_ARGS(inode, page, nr_pages),
TP_STRUCT__entry(
__field(dev_t, dev)
__field(u32, fhandle)
__field(u64, fileid)
__field(u64, version)
+ __field(loff_t, offset)
__field(unsigned int, nr_pages)
),
@@ -909,15 +911,16 @@ TRACE_EVENT(nfs_aop_readahead,
__entry->fileid = nfsi->fileid;
__entry->fhandle = nfs_fhandle_hash(&nfsi->fh);
__entry->version = inode_peek_iversion_raw(inode);
+ __entry->offset = page_index(page) << PAGE_SHIFT;
__entry->nr_pages = nr_pages;
),
TP_printk(
- "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu nr_pages=%u",
+ "fileid=%02x:%02x:%llu fhandle=0x%08x version=%llu offset=%lld nr_pages=%u",
MAJOR(__entry->dev), MINOR(__entry->dev),
(unsigned long long)__entry->fileid,
__entry->fhandle, __entry->version,
- __entry->nr_pages
+ __entry->offset, __entry->nr_pages
)
);
@@ -936,6 +939,7 @@ TRACE_EVENT(nfs_aop_readahead_done,
__field(int, ret)
__field(u64, fileid)
__field(u64, version)
+ __field(loff_t, offset)
__field(unsigned int, nr_pages)
),
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index c8273d4b12ad..d11af2a9299c 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -404,7 +404,7 @@ int nfs_readpages(struct file *file, struct address_space *mapping,
struct inode *inode = mapping->host;
int ret;
- trace_nfs_aop_readahead(inode, nr_pages);
+ trace_nfs_aop_readahead(inode, lru_to_page(pages), nr_pages);
nfs_inc_stats(inode, NFSIOS_VFSREADPAGES);
ret = -ESTALE;