Skip to contentSkip to conversation

erofs: fix to add missing tracepoint in erofs_readahead()

PATCH In review Chao Yu 2 participants 4 messages Jul 7, 2025 EROFS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 erofs: fix to add missing tracepoint in erofs_readahead()

Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readahead() tracepoint in the meantime, let's add it back.

Fixes 771c994ea51f ("erofs: convert all uncompressed cases to iomap")
---
 fs/erofs/data.c | 3 +++
 1 file changed, 3 insertions(+)
fs/erofs/data.c +3 -0
index 6a329c329f43..534ac359976e 100644
@@ -356,6 +356,9 @@ static int erofs_read_folio(struct file *file, struct folio *folio)
 
 static void erofs_readahead(struct readahead_control *rac)
 {
+	trace_erofs_readahead(rac->mapping->host, readahead_index(rac),
+					readahead_count(rac), true);
+
 	return iomap_readahead(rac, &erofs_iomap_ops);
 }
 
Signature · 1 line
2.49.0
#1 lore raw
Quoted 5 lines · Chao Yu

Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readahead() tracepoint in the meantime, let's add it back.

Fixes 771c994ea51f ("erofs: convert all uncompressed cases to iomap")

Thanks Chao, btw, should we add tracepoint to erofs_read_folio() too?

Thanks,
Gao Xiang

Quoted 19 lines
---
  fs/erofs/data.c | 3 +++
  1 file changed, 3 insertions(+)
fs/erofs/data.c +3 -0
index 6a329c329f43..534ac359976e 100644
@@ -356,6 +356,9 @@ static int erofs_read_folio(struct file *file, struct folio *folio)
 
  static void erofs_readahead(struct readahead_control *rac)
  {
+	trace_erofs_readahead(rac->mapping->host, readahead_index(rac),
+					readahead_count(rac), true);
+
  	return iomap_readahead(rac, &erofs_iomap_ops);
  }
 
author maintainer
#2 lore raw
Quoted 10 lines · Gao Xiang
Quoted 5 lines · Chao Yu

Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readahead() tracepoint in the meantime, let's add it back.

Fixes 771c994ea51f ("erofs: convert all uncompressed cases to iomap")

Thanks Chao, btw, should we add tracepoint to erofs_read_folio() too?

Xiang, I guess it is useful for debug if we can add it, let me figure out a patch for that?

Thanks,

Quoted 24 lines

Thanks,
Gao Xiang

Quoted 18 lines

---
  fs/erofs/data.c | 3 +++

  1 file changed, 3 insertions(+)
fs/erofs/data.c +3 -0
index 6a329c329f43..534ac359976e 100644
@@ -356,6 +356,9 @@ static int erofs_read_folio(struct file *file, struct folio *folio)
     static void erofs_readahead(struct readahead_control *rac)
   {
+    trace_erofs_readahead(rac->mapping->host, readahead_index(rac),
+                    readahead_count(rac), true);
+
       return iomap_readahead(rac, &erofs_iomap_ops);
   }

Reviewed-by
#3 lore raw
Quoted 8 lines · Chao Yu
Quoted 7 lines · Gao Xiang
Quoted 4 lines · Chao Yu

Commit 771c994ea51f ("erofs: convert all uncompressed cases to iomap") converts to use iomap interface, it removed trace_erofs_readahead() tracepoint in the meantime, let's add it back.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Fixes 771c994ea51f ("erofs: convert all uncompressed cases to iomap")

Thanks Chao, btw, should we add tracepoint to erofs_read_folio() too?

Xiang, I guess it is useful for debug if we can add it, let me figure out a patch for that?

Yes, it's up to you if you'd like to submit anothe patch for this.

Thanks,
Gao Xiang