Skip to content

Commit 4eb56b0

Browse files
committed
erofs: refine readahead tracepoint
- trace_erofs_readpages => trace_erofs_readahead; - Rename a redundant statement `nrpages = readahead_count(rac);`; - Move the tracepoint to the beginning of z_erofs_readahead(). Signed-off-by: Gao Xiang <[email protected]> Reviewed-by: Hongbo Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
1 parent 9748f2f commit 4eb56b0

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

fs/erofs/fileio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void erofs_fileio_readahead(struct readahead_control *rac)
180180
struct folio *folio;
181181
int err;
182182

183-
trace_erofs_readpages(inode, readahead_index(rac),
183+
trace_erofs_readahead(inode, readahead_index(rac),
184184
readahead_count(rac), true);
185185
while ((folio = readahead_folio(rac))) {
186186
err = erofs_fileio_scan_folio(&io, folio);

fs/erofs/zdata.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,13 +1855,12 @@ static void z_erofs_readahead(struct readahead_control *rac)
18551855
{
18561856
struct inode *const inode = rac->mapping->host;
18571857
Z_EROFS_DEFINE_FRONTEND(f, inode, readahead_pos(rac));
1858-
struct folio *head = NULL, *folio;
18591858
unsigned int nrpages = readahead_count(rac);
1859+
struct folio *head = NULL, *folio;
18601860
int err;
18611861

1862+
trace_erofs_readahead(inode, readahead_index(rac), nrpages, false);
18621863
z_erofs_pcluster_readmore(&f, rac, true);
1863-
nrpages = readahead_count(rac);
1864-
trace_erofs_readpages(inode, readahead_index(rac), nrpages, false);
18651864
while ((folio = readahead_folio(rac))) {
18661865
folio->private = head;
18671866
head = folio;

include/trace/events/erofs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ TRACE_EVENT(erofs_read_folio,
113113
__entry->raw)
114114
);
115115

116-
TRACE_EVENT(erofs_readpages,
116+
TRACE_EVENT(erofs_readahead,
117117

118118
TP_PROTO(struct inode *inode, pgoff_t start, unsigned int nrpage,
119119
bool raw),

0 commit comments

Comments
 (0)